Restore entrypoint

This commit is contained in:
Alexandre
2025-02-15 11:47:05 +01:00
committed by GitHub
parent 28dbedadf5
commit e2f386b67b

View File

@@ -40,9 +40,9 @@ for SCRIPTS in /etc/cont-init.d/*; do
sed -i "s/(.*\s|^)exit ([0-9]+)/\1 return \2 || exit \2/g" "$SCRIPTS" sed -i "s/(.*\s|^)exit ([0-9]+)/\1 return \2 || exit \2/g" "$SCRIPTS"
sed -i "s/bashio::exit.nok/return 1/g" "$SCRIPTS" sed -i "s/bashio::exit.nok/return 1/g" "$SCRIPTS"
sed -i "s/bashio::exit.ok/return 0/g" "$SCRIPTS" sed -i "s/bashio::exit.ok/return 0/g" "$SCRIPTS"
source "$SCRIPTS" || { echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"; exit $?; } source "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"
else else
"$SCRIPTS" || { echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"; exit $?; } "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"
fi fi
# Cleanup # Cleanup
@@ -83,10 +83,8 @@ if [ "$$" -eq 1 ]; then
echo "All subprocesses terminated. Exiting." echo "All subprocesses terminated. Exiting."
exit 0 exit 0
} }
trap terminate SIGTERM trap terminate SIGTERM SIGINT
while :; do while :; do sleep infinity & wait $!; done
sleep 1
done
else else
echo " " echo " "
echo -e "\033[0;32mStarting the upstream container\033[0m" echo -e "\033[0;32mStarting the upstream container\033[0m"