Allow source

This commit is contained in:
Alexandre
2024-01-15 10:17:30 +01:00
committed by GitHub
parent 56f1c1ab9f
commit 29f59b4077

View File

@@ -31,6 +31,16 @@ for SCRIPTS in /etc/cont-init.d/*; do
sed -i "s|$currentshebang|$shebang|g" "$SCRIPTS"
fi
# Start the script
if [ "${ha_entry_source:-null}" = true ]; then
# Use source to share env variables
# shellcheck source=/dev/null
source "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"
else
# Support for posix only shell
/."$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"
fi
# Start the script
/."$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"