diff --git a/battybirdnet-pi/rootfs/custom-services.d/30-monitoring.sh b/battybirdnet-pi/rootfs/custom-services.d/30-monitoring.sh index c67135b29..42bb9953e 100755 --- a/battybirdnet-pi/rootfs/custom-services.d/30-monitoring.sh +++ b/battybirdnet-pi/rootfs/custom-services.d/30-monitoring.sh @@ -13,7 +13,7 @@ touch "$HOME/BirdSongs/StreamData/analyzing_now.txt" # Read configuration set -u -source /config/birdnet.conf 2>/dev/null +source /etc/birdnet/birdnet.conf set +u # Set constants diff --git a/battybirdnet-pi/rootfs/helpers/caddy_ingress.sh b/battybirdnet-pi/rootfs/helpers/caddy_ingress.sh index 76fda30e1..65b68aa27 100755 --- a/battybirdnet-pi/rootfs/helpers/caddy_ingress.sh +++ b/battybirdnet-pi/rootfs/helpers/caddy_ingress.sh @@ -2,7 +2,9 @@ # shellcheck shell=bash # Get values +set -u source /etc/birdnet/birdnet.conf +set +u # Create ingress configuration for Caddyfile cat << EOF >> /etc/caddy/Caddyfile diff --git a/battybirdnet-pi/rootfs/helpers/spectral_analysis.sh b/battybirdnet-pi/rootfs/helpers/spectral_analysis.sh index fb6378af1..607a314e2 100755 --- a/battybirdnet-pi/rootfs/helpers/spectral_analysis.sh +++ b/battybirdnet-pi/rootfs/helpers/spectral_analysis.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash # Performs the recording from the specified RTSP stream or soundcard +set -u source /etc/birdnet/birdnet.conf +set +u # Read the logging level from the configuration option LOGGING_LEVEL="${LogLevel_BirdnetRecordingService}" diff --git a/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh b/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh index 9e9b37781..42bb9953e 100755 --- a/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh +++ b/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh @@ -3,17 +3,17 @@ # Adapted from https://github.com/mcguirepr89/BirdNET-Pi/issues/393#issuecomment-1166445710 # Define logging functions -log_green() { echo -e "\033[32m$1\033[0m" } -log_red() { echo -e "\033[31m$1\033[0m" } -log_yellow() { echo -e "\033[33m$1\033[0m" } -log_info() { echo -e "\033[34m$1\033[0m" } +log_green() { echo -e "\033[32m$1\033[0m"; } +log_red() { echo -e "\033[31m$1\033[0m"; } +log_yellow() { echo -e "\033[33m$1\033[0m"; } +log_info() { echo -e "\033[34m$1\033[0m"; } echo "$(log_green "Starting service: throttlerecording")" touch "$HOME/BirdSongs/StreamData/analyzing_now.txt" # Read configuration set -u -source /config/birdnet.conf 2>/dev/null +source /etc/birdnet/birdnet.conf set +u # Set constants diff --git a/birdnet-pi/rootfs/helpers/caddy_ingress.sh b/birdnet-pi/rootfs/helpers/caddy_ingress.sh index 76fda30e1..65b68aa27 100755 --- a/birdnet-pi/rootfs/helpers/caddy_ingress.sh +++ b/birdnet-pi/rootfs/helpers/caddy_ingress.sh @@ -2,7 +2,9 @@ # shellcheck shell=bash # Get values +set -u source /etc/birdnet/birdnet.conf +set +u # Create ingress configuration for Caddyfile cat << EOF >> /etc/caddy/Caddyfile diff --git a/birdnet-pi/rootfs/helpers/spectral_analysis.sh b/birdnet-pi/rootfs/helpers/spectral_analysis.sh index fb6378af1..607a314e2 100755 --- a/birdnet-pi/rootfs/helpers/spectral_analysis.sh +++ b/birdnet-pi/rootfs/helpers/spectral_analysis.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash # Performs the recording from the specified RTSP stream or soundcard +set -u source /etc/birdnet/birdnet.conf +set +u # Read the logging level from the configuration option LOGGING_LEVEL="${LogLevel_BirdnetRecordingService}"