improve: include setup code in command for easy Proxmox shell usage

- The generated command now includes PULSE_SETUP_CODE environment variable
- Users can simply copy-paste the command in Proxmox shell without needing to type the code
- Makes the setup process more streamlined for the primary use case
This commit is contained in:
Pulse Monitor
2025-08-23 21:54:14 +00:00
parent 8d6245ad83
commit 60b0ebc852
+2 -1
View File
@@ -2514,9 +2514,10 @@ func (h *ConfigHandlers) HandleSetupScriptURL(w http.ResponseWriter, r *http.Req
pulseURL, req.Type, encodedHost, pulseURL, backupPerms)
// Return the URL, command, and setup code
// Include the setup code in the command for easy copy-paste in Proxmox shell
response := map[string]interface{}{
"url": scriptURL,
"command": fmt.Sprintf(`curl -sSL "%s" | bash`, scriptURL),
"command": fmt.Sprintf(`PULSE_SETUP_CODE=%s curl -sSL "%s" | bash`, code, scriptURL),
"setupCode": code, // The user needs to see this
"expires": expiry.Unix(),
}