mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 14:45:40 -04:00
29 lines
1004 B
Plaintext
29 lines
1004 B
Plaintext
#!/usr/bin/with-contenv bash
|
|
# shellcheck shell=bash
|
|
|
|
# precreate log files
|
|
if [[ ! -f /config/log/php/error.log ]]; then
|
|
touch /config/log/php/error.log
|
|
fi
|
|
|
|
# set default timezone
|
|
printf "date.timezone = %s\\n" "${TZ:-UTC}" >/etc/php83/conf.d/30_timezone.ini
|
|
|
|
# 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
|
|
fi
|
|
|
|
# symlink user php-local.ini to image
|
|
rm -rf /etc/php83/conf.d/php-local.ini
|
|
rm -rf /etc/php83/conf.d/zzz_php-local.ini
|
|
ln -s /config/php/php-local.ini /etc/php83/conf.d/zzz_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
|
|
fi
|
|
|
|
# copy user www2.conf to image
|
|
cp /config/php/www2.conf /etc/php83/php-fpm.d/www2.conf
|