mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-24 20:22:53 +00:00
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:
@@ -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(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user