diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index 1dc2c1e..4e8a814 100644 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -698,8 +698,6 @@ __exec_command() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Setup the server init scripts __start_init_scripts() { - set -e - trap 'echo "❌ Fatal error, killing container"; kill -TERM 1' ERR [ "$1" = " " ] && shift 1 [ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail local retPID="" @@ -707,9 +705,9 @@ __start_init_scripts() { local init_pids="" local retstatus="0" local initStatus="0" + local critical_failures="0" local init_dir="${1:-/usr/local/etc/docker/init.d}" local init_count="$(ls -A "$init_dir"/* 2>/dev/null | grep -v '\.sample' | wc -l)" - local critical_failures=0 local exit_on_failure="${EXIT_ON_SERVICE_FAILURE:-true}" if [ -n "$SERVICE_DISABLED" ]; then @@ -724,9 +722,9 @@ __start_init_scripts() { rm -f /run/*.pid /run/init.d/*.pid 2>/dev/null || true fi - touch /run/__start_init_scripts.pid mkdir -p "/tmp" "/run" "/run/init.d" "/usr/local/etc/docker/exec" chmod -R 777 "/tmp" "/run" "/run/init.d" "/usr/local/etc/docker/exec" + touch /run/__start_init_scripts.pid if [ "$init_count" -eq 0 ] || [ ! -d "$init_dir" ]; then mkdir -p "/data/logs/init"