refactor: remove automatic service/task installation from Linux, macOS, and Windows setup scripts.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# ZeroGravity — Windows setup
|
||||
# Creates config directories, builds the release binary, and optionally
|
||||
# installs as a scheduled task for automatic startup.
|
||||
# Creates config directories, checks prerequisites, and builds the release binary.
|
||||
# Run as: powershell -ExecutionPolicy Bypass -File scripts\setup-windows.ps1
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -51,37 +50,6 @@ if (-not (Test-Path $Binary)) {
|
||||
}
|
||||
Write-Host " Built: $Binary"
|
||||
|
||||
# ── 5. Scheduled task (optional) ──
|
||||
$TaskName = "ZeroGravity Proxy"
|
||||
$Existing = Get-ScheduledTask -TaskName $TaskName -ErrorAction SilentlyContinue
|
||||
|
||||
if ($Existing) {
|
||||
Write-Host "→ Scheduled task '$TaskName' already exists. Updating…"
|
||||
Unregister-ScheduledTask -TaskName $TaskName -Confirm:$false
|
||||
}
|
||||
|
||||
Write-Host "→ Creating scheduled task '$TaskName'…"
|
||||
$Action = New-ScheduledTaskAction `
|
||||
-Execute $Binary `
|
||||
-WorkingDirectory $ProjectDir
|
||||
|
||||
$Trigger = New-ScheduledTaskTrigger -AtLogOn
|
||||
$Settings = New-ScheduledTaskSettingsSet `
|
||||
-AllowStartIfOnBatteries `
|
||||
-DontStopIfGoingOnBatteries `
|
||||
-RestartCount 3 `
|
||||
-RestartInterval (New-TimeSpan -Minutes 1)
|
||||
|
||||
Register-ScheduledTask `
|
||||
-TaskName $TaskName `
|
||||
-Action $Action `
|
||||
-Trigger $Trigger `
|
||||
-Settings $Settings `
|
||||
-Description "ZeroGravity OpenAI-compatible proxy" | Out-Null
|
||||
|
||||
Write-Host " Installed as logon task."
|
||||
Write-Host ""
|
||||
Write-Host "✓ Setup complete."
|
||||
Write-Host " Start now: schtasks /run /tn '$TaskName'"
|
||||
Write-Host " Stop: schtasks /end /tn '$TaskName'"
|
||||
Write-Host " Or manually: .\target\release\zerogravity.exe"
|
||||
Write-Host " Start: .\target\release\zerogravity.exe"
|
||||
|
||||
Reference in New Issue
Block a user