fix TZ inheritance on install & init process
This commit is contained in:
parent
32093e01d6
commit
43ca75bef6
Binary file not shown.
|
@ -39,6 +39,7 @@ echo
|
|||
tmpsed="/etc/php5/php.ini"
|
||||
sed -ir 's/expose_php = On/expose_php = Off/' $tmpsed
|
||||
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||
cat $tmpsed | grep "date.timezone"
|
||||
sed -i "s|;*cgi.fix_pathinfo=.*|cgi.fix_pathinfo= 0|i" $tmpsed
|
||||
tmpsed="/etc/php5/php-fpm.conf"
|
||||
sed -i "s|;*daemonize\s*=\s*yes|daemonize = no|g" $tmpsed
|
||||
|
|
|
@ -9,9 +9,9 @@ fi
|
|||
if [ ! -f /app/$WWW_DIR/$WWW_INDEX ]; then
|
||||
echo "<?php phpinfo();" > /app/$WWW_DIR/$WWW_INDEX
|
||||
fi
|
||||
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
||||
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
||||
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
||||
tmpsed=/etc/apache2/httpd.conf
|
||||
sed -i 's#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g' $tmpsed
|
||||
sed -i 's#AllowOverride none#AllowOverride All#' $tmpsed
|
||||
|
||||
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
||||
chown -R 1000:apache /app/$WWW_DIR
|
||||
|
|
4
pluie/alpine-apache-fpm/pre-init.d/30-tz.sh
Normal file
4
pluie/alpine-apache-fpm/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
tmpsed="/etc/php5/php.ini"
|
||||
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||
cat $tmpsed | grep "date.timezone"
|
Binary file not shown.
4
pluie/alpine-apache-php7/pre-init.d/30-tz.sh
Normal file
4
pluie/alpine-apache-php7/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
tmpsed="/etc/php7/php.ini"
|
||||
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||
cat $tmpsed | grep "date.timezone"
|
Binary file not shown.
|
@ -9,9 +9,9 @@ fi
|
|||
if [ ! -f /app/$WWW_DIR/$WWW_INDEX ]; then
|
||||
echo "<?php phpinfo();" > /app/$WWW_DIR/$WWW_INDEX
|
||||
fi
|
||||
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
||||
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
||||
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
||||
tmpsed=/etc/apache2/httpd.conf
|
||||
sed -i 's#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g' "$tmpsed"
|
||||
sed -i 's#AllowOverride none#AllowOverride All#' "$tmpsed"
|
||||
|
||||
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
||||
chown -R 1000:apache /app/$WWW_DIR
|
||||
|
|
4
pluie/alpine-apache/pre-init.d/30-tz.sh
Normal file
4
pluie/alpine-apache/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
tmpsed="/etc/php5/php.ini"
|
||||
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||
cat $tmpsed | grep "date.timezone"
|
Binary file not shown.
4
pluie/alpine-fpm-php7/pre-init.d/30-tz.sh
Normal file
4
pluie/alpine-fpm-php7/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
tmpsed="/etc/php7/php.ini"
|
||||
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||
cat $tmpsed | grep "date.timezone"
|
Binary file not shown.
|
@ -5,7 +5,6 @@
|
|||
if [ ! -z "$TZ" ] && [ -f "/usr/share/zoneinfo/$TZ" ]; then
|
||||
echo "$TZ" > /etc/TZ
|
||||
cp "/usr/share/zoneinfo/$TZ" "/etc/localtime"
|
||||
apk del tzdata
|
||||
if [ ! "${TZ///*/}" = "$TZ" ]; then
|
||||
mkdir -p "/usr/share/zoneinfo/${TZ///*/}"
|
||||
fi
|
||||
|
@ -13,6 +12,7 @@ if [ ! -z "$TZ" ] && [ -f "/usr/share/zoneinfo/$TZ" ]; then
|
|||
echo -e "\033[1;38;5;203mTIMEZONE : $TZ"
|
||||
date
|
||||
echo -en "\033[m"
|
||||
apk del tzdata
|
||||
else
|
||||
echo -e "\033[1;38;5;203mNO DEFINED TIMEZONE"
|
||||
fi
|
||||
|
|
7
pluie/alpine/pre-init.d/30-tz.sh
Normal file
7
pluie/alpine/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$TZ" != "Europe/Paris" ]; then
|
||||
apk -U add tzdata
|
||||
. /scripts/install.d/30-tz.sh
|
||||
. /scripts/install.d/40-fix.sh
|
||||
fi
|
Loading…
Reference in New Issue
Block a user