Enhance build-cloudinit-image.sh with improved error handling for decompression: add checks for xz installation, validate downloaded file type, and capture detailed error messages during decompression failures. Update deploy-to-proxmox.sh to restart cm4-dashboard service after enabling it, ensuring new code is loaded.

This commit is contained in:
nearxos
2026-02-19 15:38:33 +02:00
parent 39aa042dc9
commit ad00491487
3 changed files with 68 additions and 2 deletions

View File

@@ -317,7 +317,8 @@ fi
pct exec "$CTID" -- cp /opt/cm4-provisioning/dashboard/cm4-dashboard.service /etc/systemd/system/
pct exec "$CTID" -- systemctl daemon-reload
pct exec "$CTID" -- systemctl enable --now cm4-dashboard
log "LXC: cm4-dashboard enabled and started."
pct exec "$CTID" -- systemctl restart cm4-dashboard
log "LXC: cm4-dashboard enabled and restarted (new code loaded)."
# --- LXC: optional SSH (root password + SSH key from deploy env) ---
if [[ -n "${DEPLOY_SSH_KEY_B64:-}" ]] || [[ -n "${DEPLOY_LXC_PWD_B64:-}" ]]; then