You've already forked Atomcms-edit
Nitro V3 update: CLI-only (Linux), settings via .env
- Moved Nitro V3 update from web UI (Commandocentrum) to CLI-only - Removed configure paths form and runUpdateNitrov3() from admin panel - update-Nitrov3.sh now loads .env automatically from its directory - Added all NITRO_* env vars to .env.example.linux and .env - Removed configurable paths from database (replaced by .env) - Updated README and CHANGELOG
This commit is contained in:
+9
-2
@@ -3,8 +3,15 @@
|
||||
# Strict mode: exit on any error, undefined var, or pipe failure
|
||||
set -euo pipefail
|
||||
|
||||
# Laad .env bestand uit dezelfde directory als dit script
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
if [ -f "$SCRIPT_DIR/.env" ]; then
|
||||
set -a
|
||||
. "$SCRIPT_DIR/.env"
|
||||
set +a
|
||||
fi
|
||||
|
||||
# Real-time output via pseudo-terminal (unbuffer from expect)
|
||||
# Dit forceert line-buffered output voor ALLE commands, ook in web interfaces
|
||||
if [ -z "${_UNBUFFERED:-}" ] && command -v unbuffer &> /dev/null; then
|
||||
export _UNBUFFERED=1
|
||||
exec unbuffer bash "$0" "$@"
|
||||
@@ -14,7 +21,7 @@ exec 2>&1
|
||||
# Trap for clean error messages
|
||||
trap 'echo "=== ❌ FOUT: Update mislukt op regel $LINENO (commando: $BASH_COMMAND) ===" >&2; exit 1' ERR
|
||||
|
||||
# --- CONFIGURATION (overridable via environment variables) ---
|
||||
# --- CONFIGURATION (uit env vars, met defaults) ---
|
||||
DB_NAME="${NITRO_DB_NAME:-habbo}"
|
||||
DB_HOST="${NITRO_DB_HOST:-127.0.0.1}"
|
||||
DB_PORT="${NITRO_DB_PORT:-3306}"
|
||||
|
||||
Reference in New Issue
Block a user