Update shebang and execution method in init scripts

Modify shebang insertion and change script execution method.
This commit is contained in:
Alexandre
2026-04-03 09:02:31 +02:00
committed by GitHub
parent 4490320c53
commit 2f4cf45fe8

View File

@@ -11,9 +11,9 @@ set -e
if [ -d /etc/cont-init.d ]; then
for script in /etc/cont-init.d/*.sh; do
[ -f "$script" ] || continue
sed -i "1a\#!/usr/bin/env bashio" "$script"
sed -i '1s|.*|#!/usr/bin/env bashio|' "$script"
echo "[Maintainerr] Running init script: $script"
exec "$script"
bash "$script" # ← bash, not exec
done
fi