diff --git a/.bumpversion.cfg b/.bumpversion.cfg index f824b5c..e781e77 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.7.14 +current_version = 0.7.15 commit = True tag = True diff --git a/.gitignore b/.gitignore index 8a63f8d..b19946e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ backups done.txt static/nginx_init.sh static/nginx.conf +.idea/ diff --git a/src/_check.sh b/src/_check.sh index b414c85..1f2ffa7 100644 --- a/src/_check.sh +++ b/src/_check.sh @@ -23,6 +23,7 @@ function mod_check() { fi mod_etl_fix mod_uploads_vol_fix + mod_locales_vol_fix VALIDATION_ONLY=1 configure_couchbase_users postgres_metrics_validation check_for_maintenance_mode @@ -80,6 +81,24 @@ function mod_uploads_vol_fix() { fi } +function mod_locales_vol_fix() { + if [ "$CONTAINER_RUNTIME" == "podman" ]; then + error "localesOverride volume ownership checks are not supported with Podman. Skipping" + return + else + info "Checking localesOverride volume ownership" + local user=`compose_client exec plextracapi whoami` + local dotfile_exist=`compose_client exec plextracapi find localesOverride -type f -name .vol-chown-pt` + if [ "$user" != "root" ] && [ "$dotfile_exist" = "" ]; then + # this uid:gid is hardcoded in the base image and expected by the backend, do NOT change this chown + info "Ensuring locales directory ownership is 1337:1337, this may take awhile..." + compose_client exec -u 0 plextracapi chown -R 1337:1337 localesOverride/ + compose_client exec -u 0 plextracapi chmod 774 -R localesOverride/ + compose_client exec plextracapi touch localesOverride/.vol-chown-pt + fi + fi +} + # Check for an existing installation function _check_no_existing_installation() { if [ ${IGNORE_EXISTING_INSTALLATION:-0} -eq 1 ]; then diff --git a/src/plextrac b/src/plextrac index 7431a29..e479b12 100755 --- a/src/plextrac +++ b/src/plextrac @@ -1,7 +1,7 @@ #!/bin/bash set -Eeuo pipefail -VERSION=0.7.14 +VERSION=0.7.15 ## Podman Global Declaration Variable declare -A svcValues