[PHP-FPM] Check if tz data import is necessary
parent
eadf051d70
commit
322dc169e6
|
@ -76,9 +76,12 @@ if [ ${SQL_CHANGED} -eq 1 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check mysql tz import
|
# Check mysql tz import
|
||||||
SQL_FULL_TZINFO_IMPORT_RETURN=$(curl --silent --insecure -XPOST https://dockerapi/containers/${CONTAINER_ID}/exec -d '{"cmd":"system", "task":"mysql_tzinfo_to_sql"}' --silent -H 'Content-type: application/json')
|
TZ_CHECK=$(mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "SELECT CONVERT_TZ('2019-11-02 23:33:00','Europe/Berlin','UTC') AS time;" -BN 2> /dev/null)
|
||||||
echo "MySQL mysql_tzinfo_to_sql - debug output:"
|
if [[ -z ${TZ_CHECK} ]]; then
|
||||||
echo ${SQL_FULL_TZINFO_IMPORT_RETURN}
|
SQL_FULL_TZINFO_IMPORT_RETURN=$(curl --silent --insecure -XPOST https://dockerapi/containers/${CONTAINER_ID}/exec -d '{"cmd":"system", "task":"mysql_tzinfo_to_sql"}' --silent -H 'Content-type: application/json')
|
||||||
|
echo "MySQL mysql_tzinfo_to_sql - debug output:"
|
||||||
|
echo ${SQL_FULL_TZINFO_IMPORT_RETURN}
|
||||||
|
fi
|
||||||
|
|
||||||
# Trigger db init
|
# Trigger db init
|
||||||
echo "Running DB init..."
|
echo "Running DB init..."
|
||||||
|
|
|
@ -97,7 +97,7 @@ services:
|
||||||
- rspamd
|
- rspamd
|
||||||
|
|
||||||
php-fpm-mailcow:
|
php-fpm-mailcow:
|
||||||
image: mailcow/phpfpm:1.53
|
image: mailcow/phpfpm:1.54
|
||||||
build: ./data/Dockerfiles/phpfpm
|
build: ./data/Dockerfiles/phpfpm
|
||||||
command: "php-fpm -d date.timezone=${TZ} -d expose_php=0"
|
command: "php-fpm -d date.timezone=${TZ} -d expose_php=0"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
Loading…
Reference in New Issue