mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-04 20:22:30 +02:00
Fix BirdNET-Pi standalone PHP startup
This commit is contained in:
@@ -4,12 +4,13 @@
|
|||||||
# Correct /config permissions after startup
|
# Correct /config permissions after startup
|
||||||
chown pi:pi /config
|
chown pi:pi /config
|
||||||
|
|
||||||
# Waiting for dbus
|
# D-Bus is not guaranteed to be available in standalone Docker mode. Use the
|
||||||
until [[ -e /var/run/dbus/system_bus_socket ]]; do
|
# configured TZ directly and only query timedatectl when its bus is ready.
|
||||||
sleep 1s
|
TZ_VALUE="${TZ:-}"
|
||||||
done
|
if [[ -S /var/run/dbus/system_bus_socket ]] && command -v timedatectl > /dev/null 2>&1; then
|
||||||
|
TZ_VALUE="$(timedatectl show -p Timezone --value 2> /dev/null || true)"
|
||||||
|
fi
|
||||||
|
export TZ="${TZ_VALUE:-Etc/UTC}"
|
||||||
|
|
||||||
TZ_VALUE="$(timedatectl show -p Timezone --value)"
|
echo "Starting service: php fpm"
|
||||||
export TZ="$TZ_VALUE"
|
|
||||||
echo "Starting service: php pfm"
|
|
||||||
exec /usr/sbin/php-fpm* -F
|
exec /usr/sbin/php-fpm* -F
|
||||||
|
|||||||
Reference in New Issue
Block a user