From 069c15c41dc2a725395359b606fded87f6489ecc Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 25 Jul 2025 22:04:18 +0200 Subject: [PATCH] Update ha_entrypoint.sh --- .templates/ha_entrypoint.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.templates/ha_entrypoint.sh b/.templates/ha_entrypoint.sh index ccc3cd712..d1a26b61e 100644 --- a/.templates/ha_entrypoint.sh +++ b/.templates/ha_entrypoint.sh @@ -68,11 +68,15 @@ for SCRIPTS in /etc/cont-init.d/*; do done # Start services.d -for service_dir in /etc/services.d/*; do - SCRIPTS="${service_dir}/run" - [ -e "$SCRIPTS" ] || continue - run_script "$SCRIPTS" service -done +if [ "$$" -eq 1 ]; then + for service_dir in /etc/services.d/*; do + SCRIPTS="${service_dir}/run" + [ -e "$SCRIPTS" ] || continue + run_script "$SCRIPTS" service + done +else + echo "Not PID 1 — skipping service startup" +fi ###################### # Starting container #