mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-04-14 11:28:02 +02:00
Fix time in config.php
This commit is contained in:
@@ -73,6 +73,12 @@ mv /helpers/timedatectl /usr/bin/timedatectl
|
||||
chown pi:pi /usr/bin/timedatectl
|
||||
chmod a+x /usr/bin/timedatectl
|
||||
|
||||
# Correct timezone showing in config.php
|
||||
sed -i -e '/<option disabled selected>/s/selected//' \
|
||||
-e '/\$current_timezone = trim(shell_exec("timedatectl show --value --property=Timezone"));/d' \
|
||||
-e "/\$date = new DateTime('now');/i \$current_timezone = trim(shell_exec(\"timedatectl show --value --property=Timezone\"));" \
|
||||
-e "/\$date = new DateTime('now');/i date_default_timezone_set(\$current_timezone);" "$HOME/BirdNET-Pi/scripts/config.php"
|
||||
|
||||
# Correct language labels according to birdnet.conf
|
||||
echo "... adapting labels according to birdnet.conf"
|
||||
export "$(grep "^DATABASE_LANG" /config/birdnet.conf)" || bashio::log.warning "DATABASE_LANG not found in configuration. Using default labels."
|
||||
|
||||
Reference in New Issue
Block a user