mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-04 23:04:09 +02: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"
|
sed -i "s|$currentshebang|$shebang|g" "$SCRIPTS"
|
||||||
fi
|
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
|
# Start the script
|
||||||
/."$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"
|
/."$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user