[grade=B urn:ump:x37xj4seku3isvffxkwmahymvjijrwinndnfpubv664spur7kogq] fix(installer): remove BACKUP_DIR readonly collision that aborted every install
readonly BACKUP_DIR (constants) collided with the BACKUP_DIR= tunable, so every curl|bash run died with 'BACKUP_DIR: readonly variable'. Removed the readonly constant and resolve the default (/etc/dashcaddy/backups) at end of parse_args; --backup-dir flag still overrides. Live file + /opt copy patched identically.
This commit is contained in:
1 file changed
+3
-1
@@ -27,7 +27,6 @@ readonly API_DIR="${SITES_DIR}/dashcaddy-api"
|
||||
readonly DASHBOARD_DIR="${SITES_DIR}/status"
|
||||
readonly CONTAINER_NAME="dashcaddy-api"
|
||||
readonly CADDY_ADMIN_PORT=2019
|
||||
readonly BACKUP_DIR="${BACKUP_DIR:-${INSTALL_DIR}/backups}"
|
||||
readonly DEFAULT_MAX_STORAGE_BYTES=""
|
||||
|
||||
# ---- Tunables (overridable via flags) --------------------------------------
|
||||
@@ -1045,6 +1044,9 @@ parse_args() {
|
||||
|
||||
# Normalize TLD
|
||||
if [[ -n "$TLD" && "$TLD" != .* ]]; then TLD=".$TLD"; fi
|
||||
|
||||
# Resolve BACKUP_DIR default when not set by the --backup-dir flag.
|
||||
BACKUP_DIR="${BACKUP_DIR:-${INSTALL_DIR}/backups}"
|
||||
}
|
||||
|
||||
print_help() {
|
||||
|
||||
Reference in new issue
Block a user