mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-01 19:48:47 +02:00
Update shebang and execution method in init scripts
Modify shebang insertion and change script execution method.
This commit is contained in:
@@ -11,9 +11,9 @@ set -e
|
|||||||
if [ -d /etc/cont-init.d ]; then
|
if [ -d /etc/cont-init.d ]; then
|
||||||
for script in /etc/cont-init.d/*.sh; do
|
for script in /etc/cont-init.d/*.sh; do
|
||||||
[ -f "$script" ] || continue
|
[ -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"
|
echo "[Maintainerr] Running init script: $script"
|
||||||
exec "$script"
|
bash "$script" # ← bash, not exec
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user