diff --git a/birdnet-pi/rootfs/etc/cont-init.d/31-checks.sh b/birdnet-pi/rootfs/etc/cont-init.d/31-checks.sh index 3805c10a7..cbb038d8c 100755 --- a/birdnet-pi/rootfs/etc/cont-init.d/31-checks.sh +++ b/birdnet-pi/rootfs/etc/cont-init.d/31-checks.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 + ###################### # CHECK BIRDNET.CONF # ######################