diff --git a/scripts/install_services.sh b/scripts/install_services.sh index 1585259..bd9244a 100755 --- a/scripts/install_services.sh +++ b/scripts/install_services.sh @@ -312,7 +312,7 @@ Restart=always RestartSec=120 Type=simple User=$USER -ExecStart=$PYTHON_VIRTUAL_ENV /usr/local/bin/daily_plot.py +ExecStart=$PYTHON_VIRTUAL_ENV /usr/local/bin/daily_plot.py --daemon --sleep 2 [Install] WantedBy=multi-user.target EOF diff --git a/scripts/update_birdnet_snippets.sh b/scripts/update_birdnet_snippets.sh index f6e7360..5088f3d 100755 --- a/scripts/update_birdnet_snippets.sh +++ b/scripts/update_birdnet_snippets.sh @@ -55,7 +55,10 @@ ensure_python_package() { } # update snippets below - +if ! grep 'daemon' $HOME/BirdNET-Pi/templates/chart_viewer.service &>/dev/null;then + sed -i "s|daily_plot.py.*|daily_plot.py --daemon --sleep 2|" ~/BirdNET-Pi/templates/chart_viewer.service + systemctl daemon-reload && restart_services.sh +fi # update snippets above systemctl daemon-reload