From 3e25d88fa81bcd07200963ea6746437bb63d6c16 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 6 Jun 2024 21:45:09 +0200 Subject: [PATCH] Livestream Enabled from boot with option https://github.com/alexbelgium/hassio-addons/issues/1371#issuecomment-2152801411 --- birdnet-pi/rootfs/etc/cont-init.d/99-run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/birdnet-pi/rootfs/etc/cont-init.d/99-run.sh b/birdnet-pi/rootfs/etc/cont-init.d/99-run.sh index f5ef7357e..2525729da 100755 --- a/birdnet-pi/rootfs/etc/cont-init.d/99-run.sh +++ b/birdnet-pi/rootfs/etc/cont-init.d/99-run.sh @@ -52,6 +52,13 @@ bashio::log.info "Starting BirdNET-Pi services" chmod +x "$HOME"/BirdNET-Pi/scripts/restart_services.sh "$HOME"/BirdNET-Pi/scripts/restart_services.sh +if bashio::config.true LIVESTREAM_DEFAULT_ENABLED; then + echo "... starting livestream" + sudo systemctl enable icecast2 + sudo systemctl start icecast2.service + sudo systemctl enable --now livestream.service +fi + # Correct the phpsysinfo for the correct gotty service gottyservice="$(pgrep -l "gotty" | awk '{print $NF}' | head -n 1)" echo "... using $gottyservice in phpsysinfo"