From 4e20827feaac0b29137c446995033c052931e711 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:22:42 +0100 Subject: [PATCH] Update 02-restorestreamdata.sh --- birdnet-pi/rootfs/etc/cont-init.d/02-restorestreamdata.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/birdnet-pi/rootfs/etc/cont-init.d/02-restorestreamdata.sh b/birdnet-pi/rootfs/etc/cont-init.d/02-restorestreamdata.sh index fbdfe1a89..c5a2a1ccb 100755 --- a/birdnet-pi/rootfs/etc/cont-init.d/02-restorestreamdata.sh +++ b/birdnet-pi/rootfs/etc/cont-init.d/02-restorestreamdata.sh @@ -2,6 +2,14 @@ # shellcheck shell=bash set -e +# Save a copy of the script for further restarts +if [ -f /etc/cont-init.d/99-run.sh ]; then + mkdir -p /etc/scripts-init + sed -i "s|/etc/cont-init.d|/etc/scripts-init|g" /ha_entrypoint.sh + sed -i "/ rm/d" /ha_entrypoint.sh + cp /etc/cont-init.d/99-run.sh /etc/scripts-init/ +fi + if [ -d /config/TemporaryFiles ]; then # Check if there are .wav files in /config/TemporaryFiles