From 7c905578ad89f62f418d9466ad3d566dcb39cc3b Mon Sep 17 00:00:00 2001 From: thespad Date: Sun, 22 Dec 2024 11:09:00 +0000 Subject: [PATCH] Fix timezone overwriting php-local.ini contents --- root/etc/s6-overlay/s6-rc.d/init-php/run | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-php/run b/root/etc/s6-overlay/s6-rc.d/init-php/run index 37ef5e5..451fcf1 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-php/run +++ b/root/etc/s6-overlay/s6-rc.d/init-php/run @@ -9,11 +9,10 @@ fi # create local php.ini if it doesn't exist, set local timezone if [[ ! -f /config/php/php-local.ini ]]; then printf "; Edit this file to override php.ini directives\\n\\n" >/config/php/php-local.ini + # set default timezone + printf "date.timezone = %s\\n" "${TZ:-UTC}" >/config/php/php-local.ini fi -# set default timezone -printf "date.timezone = %s\\n" "${TZ:-UTC}" >/config/php/php-local.ini - # create override for www.conf if it doesn't exist if [[ ! -f /config/php/www2.conf ]]; then printf "; Edit this file to override www.conf and php-fpm.conf directives and restart the container\\n\\n; Pool name\\n[www]\\n\\n" >/config/php/www2.conf