From deef8238769f291e4cc326067cb9a724f39fe4b3 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 19 Feb 2018 22:02:07 +0100 Subject: [PATCH] +fix ter now updates 'chown' on php-fpm container #2 --- metactl/ci/web.sh | 2 -- metactl/post-start.sh | 17 ++++++++++++----- metactl/pre-start.sh | 4 ---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/metactl/ci/web.sh b/metactl/ci/web.sh index 18a4394..ba10e56 100644 --- a/metactl/ci/web.sh +++ b/metactl/ci/web.sh @@ -32,8 +32,6 @@ while true; do # N. Recreate trigger test ! -f $TRIGGER && touch $TRIGGER; - chgrp 33 $TRIGGER; - chmod 775 $TRIGGER; sleep 1; diff --git a/metactl/post-start.sh b/metactl/post-start.sh index bad0dc1..9fff605 100644 --- a/metactl/post-start.sh +++ b/metactl/post-start.sh @@ -30,7 +30,9 @@ echo "ready"; -## [1] Restore database + + +## [2] Restore database # 1. Check if dump file exists echo -ne " * Check dump file..........."; @@ -50,9 +52,6 @@ else ec @echo -n "*** Create trigger............."; @test ! -d ./virtual/ci && mkdir ./virtual/ci; (exit 0); - @chmod 777 ./virtual/ci; (exit 0); - @touch ./virtual/ci/trigger; echo "done"; - @chmod 777 ./virtual/ci/trigger; (exit 0);ho "missing"; # Create 'persistent' directory if missing test ! -d $ROOT/persistent && mkdir -p $ROOT/persistent; @@ -61,4 +60,12 @@ else touch $MARIADB_DUMP; -fi; \ No newline at end of file +fi; + + + + + +## [3] Grant www-data for CI triggers +echo -n " * Grant php on triggers....."; +docker exec php-fpm chown www-data -R /ci && echo "granted" || (echo "failed"; exit 1); \ No newline at end of file diff --git a/metactl/pre-start.sh b/metactl/pre-start.sh index 0079fa4..f269bd2 100644 --- a/metactl/pre-start.sh +++ b/metactl/pre-start.sh @@ -16,14 +16,10 @@ chmod o=rx `dirname $ROOT`/virtual/ci; # 2. Create 'env' trigger echo -ne " * Create 'env' trigger......"; test ! -f `dirname $ROOT`/virtual/ci/env && ( touch `dirname $ROOT`/virtual/ci/env && echo "created" || (echo "failed"; exit 1)) || echo "already"; -chgrp 33 `dirname $ROOT`/virtual/ci/env; -chmod 775 `dirname $ROOT`/virtual/ci/env; # 3. Create 'web' trigger echo -ne " * Create 'web' trigger......"; test ! -f `dirname $ROOT`/virtual/ci/web && ( touch `dirname $ROOT`/virtual/ci/web && echo "created" || (echo "failed"; exit 1)) || echo "already"; -chgrp 33 `dirname $ROOT`/virtual/ci/web; -chmod 775 `dirname $ROOT`/virtual/ci/web; # 3. Create 'env' spy echo -ne " * Launch 'env' spy..........";