refactor: remove automatic service/task installation from Linux, macOS, and Windows setup scripts.

This commit is contained in:
Nikketryhard
2026-02-18 13:54:43 -06:00
parent 9f36cc81d7
commit 45b5cc15e0
3 changed files with 8 additions and 107 deletions

View File

@@ -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"