mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 18:01:03 +01:00
Allow source
This commit is contained in:
@@ -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 $?"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user