From adfd90b94197e6588f151572bb895c58b204de1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Sun, 28 Mar 2021 13:00:53 +0200 Subject: [PATCH] Fixes * Symlink for custom PHP config created at build time * Fix ownership issues when switches from old to new runtime --- build_php.sh | 2 ++ build_php8.sh | 2 ++ start.sh | 7 +++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build_php.sh b/build_php.sh index a24c574..a78314f 100755 --- a/build_php.sh +++ b/build_php.sh @@ -80,3 +80,5 @@ echo "no" | /opt/techs/php-$VERSION/bin/pecl install imagick echo "zend_extension=opcache.so" > /opt/techs/php-$VERSION/etc/conf.d/extensions.ini echo "extension=redis.so" >> /opt/techs/php-$VERSION/etc/conf.d/extensions.ini + +ln -s /srv/conf/php-fpm/php.ini /opt/techs/php-$VERSION/etc/conf.d/99-app.ini diff --git a/build_php8.sh b/build_php8.sh index 3af237c..b4aeaec 100755 --- a/build_php8.sh +++ b/build_php8.sh @@ -75,3 +75,5 @@ echo "extension=redis.so" >> /opt/techs/php-$VERSION/etc/conf.d/extensions.ini # https://github.com/Imagick/imagick/issues/358 # echo "no" | /opt/techs/php-$VERSION/bin/pecl install imagick # echo "extension=imagick.so" >> /opt/techs/php-$VERSION/etc/conf.d/extensions.ini + +ln -s /srv/conf/php-fpm/php.ini /opt/techs/php-$VERSION/etc/conf.d/99-app.ini diff --git a/start.sh b/start.sh index e1c86c9..3354ee0 100755 --- a/start.sh +++ b/start.sh @@ -5,7 +5,10 @@ ################################## for d in /srv/log /srv/conf /srv/run /srv/conf/supervisor.d /srv/var; do - test ! -e $d && mkdir -p $d + if [ ! -e $d ]; then + mkdir -p $d + chown app:app $d + fi done # Bin directory where active tech is located along other tools @@ -32,7 +35,7 @@ rm -f /srv/run/*.pid if [ -e /srv/.rosti ]; then echo "app:`cat /srv/.rosti`" | chpasswd # file with ssh password has different owner - test chown root:root /srv/.rosti + chown root:root /srv/.rosti chmod 600 /srv/.rosti fi if [ -n "$SSHPASS" ]; then