Skip to content

A live bird collage card for your Home Assistant dashboard.

gotty: fix: forward compatibility with v1.5

frederik819f390614a9
diff --git a/scripts/install_services.sh b/scripts/install_services.sh
index 9ea5847f..dd3f802d 100755
--- a/scripts/install_services.sh
+++ b/scripts/install_services.sh
@@ -302,7 +302,7 @@ RestartSec=3
Type=simple
User=${USER}
Environment=TERM=xterm-256color
-ExecStart=/usr/local/bin/gotty --address localhost -p 8080 -P log --title-format "BirdNET-Pi Log" birdnet_log.sh
+ExecStart=/usr/local/bin/gotty --address localhost -p 8080 --path log --title-format "BirdNET-Pi Log" birdnet_log.sh
[Install]
WantedBy=multi-user.target
EOF
@@ -316,7 +316,7 @@ Restart=on-failure
RestartSec=3
Type=simple
Environment=TERM=xterm-256color
-ExecStart=/usr/local/bin/gotty --address localhost -w -p 8888 -P terminal --title-format "BirdNET-Pi Terminal" login
+ExecStart=/usr/local/bin/gotty --address localhost -w -p 8888 --path terminal --title-format "BirdNET-Pi Terminal" login
[Install]
WantedBy=multi-user.target
EOF
diff --git a/scripts/update_birdnet_snippets.sh b/scripts/update_birdnet_snippets.sh
index 0c23cae1..fbc011cf 100755
--- a/scripts/update_birdnet_snippets.sh
+++ b/scripts/update_birdnet_snippets.sh
@@ -117,6 +117,16 @@ if ! [ -f "$HOME/BirdNET-Pi/templates/$TMP_MOUNT" ]; then
chown $USER:$USER "$HOME/BirdNET-Pi/templates/$TMP_MOUNT"
fi
+if ! grep '-P log' $HOME/BirdNET-Pi/templates/birdnet_log.service &>/dev/null;then
+ sed -i "s/-P log/--path log/" ~/BirdNET-Pi/templates/birdnet_log.service
+ systemctl daemon-reload && restart_services.sh
+fi
+
+if ! grep '-P terminal' $HOME/BirdNET-Pi/templates/web_terminal.service &>/dev/null;then
+ sed -i "s/-P terminal/--path terminal/" ~/BirdNET-Pi/templates/web_terminal.service
+ systemctl daemon-reload && restart_services.sh
+fi
+
if grep -q 'php7.4-' /etc/caddy/Caddyfile &>/dev/null; then
sed -i 's/php7.4-/php-/' /etc/caddy/Caddyfile
fi