Add force flag to bypass broken packages upon installation

This commit is contained in:
Muhammad Ibrahim
2025-10-04 13:37:05 +01:00
parent fa57b35270
commit 2659a930d6
4 changed files with 75 additions and 6 deletions

View File

@@ -480,13 +480,17 @@ router.get("/proxmox-lxc", async (req, res) => {
}
} catch (_) {}
// Inject the token credentials, server URL, and curl flags into the script
// Check for --force parameter
const force_install = req.query.force === "true" || req.query.force === "1";
// Inject the token credentials, server URL, curl flags, and force flag into the script
const env_vars = `#!/bin/bash
# PatchMon Auto-Enrollment Configuration (Auto-generated)
export PATCHMON_URL="${server_url}"
export AUTO_ENROLLMENT_KEY="${token.token_key}"
export AUTO_ENROLLMENT_SECRET="${token_secret}"
export CURL_FLAGS="${curl_flags}"
export FORCE_INSTALL="${force_install ? "true" : "false"}"
`;