From 6798e939cc6623c3dfa864f1b180147b130dfe4c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 14 Feb 2025 21:12:09 +0100 Subject: [PATCH] Delete scripts only if within supervisor, to accept restarts --- .templates/ha_entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.templates/ha_entrypoint.sh b/.templates/ha_entrypoint.sh index b90f03880..cac109765 100755 --- a/.templates/ha_entrypoint.sh +++ b/.templates/ha_entrypoint.sh @@ -46,7 +46,9 @@ for SCRIPTS in /etc/cont-init.d/*; do fi # Cleanup - rm "$SCRIPTS" + if bashio::supervisor.ping 2>/dev/null; then + rm "$SCRIPTS" + fi done ######################