mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-07 13:42:30 +02:00
Fix: source cont-init.d scripts instead of bash to inherit bashio functions
Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/88474b87-22ad-4e13-9d5c-8567d0b4098f Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6fc22476e8
commit
24d0670843
@@ -18,8 +18,10 @@ 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
|
||||||
echo "[Maintainerr] Running init script: $script"
|
echo "[Maintainerr] Running init script: $script"
|
||||||
# Use bash directly (no S6 with-contenv available)
|
# Source the script so it inherits bashio functions from bashio-standalone.
|
||||||
bash "$script"
|
# Using bash "$script" would spawn a new process without bashio:: functions,
|
||||||
|
# causing "command not found" failures under set -e.
|
||||||
|
source "$script"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user