From 9d5533c080c5c76651d077c3b737c7c6719a0dda Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Wed, 11 Dec 2024 17:04:02 +0100 Subject: [PATCH] Fix log must not use INIT if not into INIT method --- docker-run.sh | 12 +++++++----- images/15.0.3-php7.4/docker-run.sh | 13 ++++++++----- images/16.0.5-php8.1/docker-run.sh | 13 ++++++++----- images/17.0.4-php8.1/docker-run.sh | 13 ++++++++----- images/18.0.6-php8.1/docker-run.sh | 13 ++++++++----- images/19.0.4-php8.2/docker-run.sh | 13 ++++++++----- images/20.0.2-php8.2/docker-run.sh | 13 ++++++++----- images/develop/docker-run.sh | 13 ++++++++----- 8 files changed, 63 insertions(+), 40 deletions(-) diff --git a/docker-run.sh b/docker-run.sh index 92b8dd8..d882cd0 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -405,9 +405,7 @@ function run() fi fi - # Run scripts before starting - runScripts "before-starting.d" - + # Set permission local CURRENT_UID=$(id -u www-data) local CURRENT_GID=$(id -g www-data) usermod -u ${WWW_USER_ID} www-data @@ -415,14 +413,18 @@ function run() if [[ ${CURRENT_UID} -ne ${WWW_USER_ID} || ${CURRENT_GID} -ne ${WWW_GROUP_ID} ]]; then # Refresh file ownership cause it has changed - echo "[INIT] => As UID / GID have changed from default, update ownership for files in /var/ww ..." + echo "As UID / GID have changed from default, update ownership for files in /var/ww ..." chown -R www-data:www-data /var/www else # Reducing load on init : change ownership only for volumes declared in docker - echo "[INIT] => update ownership for files in /var/www/documents ..." + echo "Update ownership for files in /var/www/documents ..." chown -R www-data:www-data /var/www/documents fi + + # Run scripts before starting + runScripts "before-starting.d" + echo echo "*** You can connect to the docker Mariadb with:" diff --git a/images/15.0.3-php7.4/docker-run.sh b/images/15.0.3-php7.4/docker-run.sh index fe899f8..d882cd0 100755 --- a/images/15.0.3-php7.4/docker-run.sh +++ b/images/15.0.3-php7.4/docker-run.sh @@ -405,9 +405,7 @@ function run() fi fi - # Run scripts before starting - runScripts "before-starting.d" - + # Set permission local CURRENT_UID=$(id -u www-data) local CURRENT_GID=$(id -g www-data) usermod -u ${WWW_USER_ID} www-data @@ -415,13 +413,18 @@ function run() if [[ ${CURRENT_UID} -ne ${WWW_USER_ID} || ${CURRENT_GID} -ne ${WWW_GROUP_ID} ]]; then # Refresh file ownership cause it has changed - echo "[INIT] => As UID / GID have changed from default, update ownership for files in /var/ww ..." + echo "As UID / GID have changed from default, update ownership for files in /var/ww ..." chown -R www-data:www-data /var/www else # Reducing load on init : change ownership only for volumes declared in docker - echo "[INIT] => update ownership for files in /var/www/documents ..." + echo "Update ownership for files in /var/www/documents ..." chown -R www-data:www-data /var/www/documents fi + + + # Run scripts before starting + runScripts "before-starting.d" + echo echo "*** You can connect to the docker Mariadb with:" diff --git a/images/16.0.5-php8.1/docker-run.sh b/images/16.0.5-php8.1/docker-run.sh index bbbf9f2..d882cd0 100755 --- a/images/16.0.5-php8.1/docker-run.sh +++ b/images/16.0.5-php8.1/docker-run.sh @@ -405,9 +405,7 @@ function run() fi fi - # Run scripts before starting - runScripts "before-starting.d" - + # Set permission local CURRENT_UID=$(id -u www-data) local CURRENT_GID=$(id -g www-data) usermod -u ${WWW_USER_ID} www-data @@ -415,14 +413,19 @@ function run() if [[ ${CURRENT_UID} -ne ${WWW_USER_ID} || ${CURRENT_GID} -ne ${WWW_GROUP_ID} ]]; then # Refresh file ownership cause it has changed - echo "[INIT] => As UID / GID have changed from default, update ownership for files in /var/ww ..." + echo "As UID / GID have changed from default, update ownership for files in /var/ww ..." chown -R www-data:www-data /var/www else # Reducing load on init : change ownership only for volumes declared in docker - echo "[INIT] => update ownership for files in /var/www/documents ..." + echo "Update ownership for files in /var/www/documents ..." chown -R www-data:www-data /var/www/documents fi + + # Run scripts before starting + runScripts "before-starting.d" + + echo echo "*** You can connect to the docker Mariadb with:" echo "sudo docker exec -it nameofwebcontainer-mariadb-1 bash" diff --git a/images/17.0.4-php8.1/docker-run.sh b/images/17.0.4-php8.1/docker-run.sh index bbbf9f2..d882cd0 100755 --- a/images/17.0.4-php8.1/docker-run.sh +++ b/images/17.0.4-php8.1/docker-run.sh @@ -405,9 +405,7 @@ function run() fi fi - # Run scripts before starting - runScripts "before-starting.d" - + # Set permission local CURRENT_UID=$(id -u www-data) local CURRENT_GID=$(id -g www-data) usermod -u ${WWW_USER_ID} www-data @@ -415,14 +413,19 @@ function run() if [[ ${CURRENT_UID} -ne ${WWW_USER_ID} || ${CURRENT_GID} -ne ${WWW_GROUP_ID} ]]; then # Refresh file ownership cause it has changed - echo "[INIT] => As UID / GID have changed from default, update ownership for files in /var/ww ..." + echo "As UID / GID have changed from default, update ownership for files in /var/ww ..." chown -R www-data:www-data /var/www else # Reducing load on init : change ownership only for volumes declared in docker - echo "[INIT] => update ownership for files in /var/www/documents ..." + echo "Update ownership for files in /var/www/documents ..." chown -R www-data:www-data /var/www/documents fi + + # Run scripts before starting + runScripts "before-starting.d" + + echo echo "*** You can connect to the docker Mariadb with:" echo "sudo docker exec -it nameofwebcontainer-mariadb-1 bash" diff --git a/images/18.0.6-php8.1/docker-run.sh b/images/18.0.6-php8.1/docker-run.sh index bbbf9f2..d882cd0 100755 --- a/images/18.0.6-php8.1/docker-run.sh +++ b/images/18.0.6-php8.1/docker-run.sh @@ -405,9 +405,7 @@ function run() fi fi - # Run scripts before starting - runScripts "before-starting.d" - + # Set permission local CURRENT_UID=$(id -u www-data) local CURRENT_GID=$(id -g www-data) usermod -u ${WWW_USER_ID} www-data @@ -415,14 +413,19 @@ function run() if [[ ${CURRENT_UID} -ne ${WWW_USER_ID} || ${CURRENT_GID} -ne ${WWW_GROUP_ID} ]]; then # Refresh file ownership cause it has changed - echo "[INIT] => As UID / GID have changed from default, update ownership for files in /var/ww ..." + echo "As UID / GID have changed from default, update ownership for files in /var/ww ..." chown -R www-data:www-data /var/www else # Reducing load on init : change ownership only for volumes declared in docker - echo "[INIT] => update ownership for files in /var/www/documents ..." + echo "Update ownership for files in /var/www/documents ..." chown -R www-data:www-data /var/www/documents fi + + # Run scripts before starting + runScripts "before-starting.d" + + echo echo "*** You can connect to the docker Mariadb with:" echo "sudo docker exec -it nameofwebcontainer-mariadb-1 bash" diff --git a/images/19.0.4-php8.2/docker-run.sh b/images/19.0.4-php8.2/docker-run.sh index bbbf9f2..d882cd0 100755 --- a/images/19.0.4-php8.2/docker-run.sh +++ b/images/19.0.4-php8.2/docker-run.sh @@ -405,9 +405,7 @@ function run() fi fi - # Run scripts before starting - runScripts "before-starting.d" - + # Set permission local CURRENT_UID=$(id -u www-data) local CURRENT_GID=$(id -g www-data) usermod -u ${WWW_USER_ID} www-data @@ -415,14 +413,19 @@ function run() if [[ ${CURRENT_UID} -ne ${WWW_USER_ID} || ${CURRENT_GID} -ne ${WWW_GROUP_ID} ]]; then # Refresh file ownership cause it has changed - echo "[INIT] => As UID / GID have changed from default, update ownership for files in /var/ww ..." + echo "As UID / GID have changed from default, update ownership for files in /var/ww ..." chown -R www-data:www-data /var/www else # Reducing load on init : change ownership only for volumes declared in docker - echo "[INIT] => update ownership for files in /var/www/documents ..." + echo "Update ownership for files in /var/www/documents ..." chown -R www-data:www-data /var/www/documents fi + + # Run scripts before starting + runScripts "before-starting.d" + + echo echo "*** You can connect to the docker Mariadb with:" echo "sudo docker exec -it nameofwebcontainer-mariadb-1 bash" diff --git a/images/20.0.2-php8.2/docker-run.sh b/images/20.0.2-php8.2/docker-run.sh index bbbf9f2..d882cd0 100755 --- a/images/20.0.2-php8.2/docker-run.sh +++ b/images/20.0.2-php8.2/docker-run.sh @@ -405,9 +405,7 @@ function run() fi fi - # Run scripts before starting - runScripts "before-starting.d" - + # Set permission local CURRENT_UID=$(id -u www-data) local CURRENT_GID=$(id -g www-data) usermod -u ${WWW_USER_ID} www-data @@ -415,14 +413,19 @@ function run() if [[ ${CURRENT_UID} -ne ${WWW_USER_ID} || ${CURRENT_GID} -ne ${WWW_GROUP_ID} ]]; then # Refresh file ownership cause it has changed - echo "[INIT] => As UID / GID have changed from default, update ownership for files in /var/ww ..." + echo "As UID / GID have changed from default, update ownership for files in /var/ww ..." chown -R www-data:www-data /var/www else # Reducing load on init : change ownership only for volumes declared in docker - echo "[INIT] => update ownership for files in /var/www/documents ..." + echo "Update ownership for files in /var/www/documents ..." chown -R www-data:www-data /var/www/documents fi + + # Run scripts before starting + runScripts "before-starting.d" + + echo echo "*** You can connect to the docker Mariadb with:" echo "sudo docker exec -it nameofwebcontainer-mariadb-1 bash" diff --git a/images/develop/docker-run.sh b/images/develop/docker-run.sh index bbbf9f2..d882cd0 100755 --- a/images/develop/docker-run.sh +++ b/images/develop/docker-run.sh @@ -405,9 +405,7 @@ function run() fi fi - # Run scripts before starting - runScripts "before-starting.d" - + # Set permission local CURRENT_UID=$(id -u www-data) local CURRENT_GID=$(id -g www-data) usermod -u ${WWW_USER_ID} www-data @@ -415,14 +413,19 @@ function run() if [[ ${CURRENT_UID} -ne ${WWW_USER_ID} || ${CURRENT_GID} -ne ${WWW_GROUP_ID} ]]; then # Refresh file ownership cause it has changed - echo "[INIT] => As UID / GID have changed from default, update ownership for files in /var/ww ..." + echo "As UID / GID have changed from default, update ownership for files in /var/ww ..." chown -R www-data:www-data /var/www else # Reducing load on init : change ownership only for volumes declared in docker - echo "[INIT] => update ownership for files in /var/www/documents ..." + echo "Update ownership for files in /var/www/documents ..." chown -R www-data:www-data /var/www/documents fi + + # Run scripts before starting + runScripts "before-starting.d" + + echo echo "*** You can connect to the docker Mariadb with:" echo "sudo docker exec -it nameofwebcontainer-mariadb-1 bash"