Update 99-run.sh

This commit is contained in:
Alexandre
2024-04-28 18:42:13 +02:00
committed by GitHub
parent 0fa251ec28
commit d131a98d3d

View File

@@ -99,6 +99,11 @@ chmod +x "$HOME"/BirdNET-Pi/scripts/restart_services.sh
echo " "
bashio::log.info "Adapting webui"
# Correct language labels
DATABASE_LANG="$(grep "^DATABASE_LANG" /config/birdnet.conf)" || exit 1
echo "... adapting labels according to birdnet.conf file to $DATABASE_LANG"
./install_language_label_nm.sh -l "$DATABASE_LANG" || exit 1
# Remove services tab
echo "... removing System Controls from webui as should be used from HA"
sed -i '/>System Controls/d' "$HOME"/BirdNET-Pi/homepage/views.php
@@ -107,6 +112,3 @@ sed -i '/>System Controls/d' "$HOME"/BirdNET-Pi/homepage/views.php
gottyservice="$(pgrep -l "gotty" | awk '{print $NF}' | head -n 1)"
echo "... using $gottyservice in phpsysinfo"
sed -i "s/,gotty,/,${gottyservice:-gotty},/g" "$HOME"/BirdNET-Pi/templates/phpsysinfo.ini
# Ensure /config chown
chown pi:pi /config