Improve unattended mode detection and export MODE

Enhanced the is_unattended() function to prioritize the MODE variable for detecting unattended/non-interactive mode, with detailed handling for various modes and legacy fallbacks. Also, export MODE in build_container() to inform install scripts about the current mode. Updated APP name in forgejo-runner.sh for consistency.
This commit is contained in:
CanbiZ (MickLesk)
2026-01-27 13:38:49 +01:00
parent 310d0e54a6
commit a82d04982d
3 changed files with 52 additions and 3 deletions

View File

@@ -3461,6 +3461,10 @@ build_container() {
export DEV_MODE_LOGS="${DEV_MODE_LOGS:-false}"
export DEV_MODE_DRYRUN="${DEV_MODE_DRYRUN:-false}"
# MODE export for unattended detection in install scripts
# This tells install scripts whether to prompt for input or use defaults
export MODE="${METHOD:-default}"
# Build PCT_OPTIONS as multi-line string
PCT_OPTIONS_STRING=" -hostname $HN"