mirror of
https://github.com/casjaysdevdocker/opengist
synced 2026-08-14 14:01:17 -04:00
Root cause: many functions in functions/entrypoint.sh ended with a bare, unguarded `[ "$DEBUGGER" = "on" ] && echo/printf/__service_banner ...` statement as their last executed line. With DEBUGGER unset (the default runtime case), the `[ ]` test is false, so the function's implicit return value is nonzero. Several of these functions (most critically __symlink, called bare from __setup_mta) are invoked as unguarded statements from other functions, and the whole entrypoint runs under `set -eo pipefail`, so the nonzero return aborted the entire script chain immediately after startup — explaining why the container only printed the first log line and exited 1, and why it only worked with DEBUGGER=on (which makes the echo run and return 0, masking the bug). Verified via two clean docker buildx build + run cycles: before the fix, `docker inspect` showed the container crash-looping (exit 1, ~3.9s uptime); after, `RestartCount=0 Status=running Health=healthy` with opengist fully started, DEBUGGER unset. - rootfs/usr/local/etc/docker/functions/entrypoint.sh: append `|| true` to all 26 bare `[ "$DEBUGGER" = "on" ] && ...` statements so their result never propagates as the enclosing function's return value - TODO.AI.md: log 20 pre-existing script-lint findings on the same file (missing `--` on grep, missing `local` on a few function-local vars, missing VERSION= line) found incidentally while diagnosing this bug; deferred as unrelated cleanup, not part of this fix