mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-19 02:17:46 +00:00
proxypilot: prefer proxypilot-engine + renamed launcher logs
This commit is contained in:
@@ -17,8 +17,8 @@ This builds `bin/cliproxyapi-latest`.
|
||||
- Restart: `./scripts/restart.sh`
|
||||
|
||||
Logs:
|
||||
- `logs/cliproxyapi.out.log`
|
||||
- `logs/cliproxyapi.err.log`
|
||||
- `logs/proxypilot-engine.out.log`
|
||||
- `logs/proxypilot-engine.err.log`
|
||||
|
||||
## Auto-start at login (launchd)
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ cat >"$plist_path" <<EOF
|
||||
<true/>
|
||||
|
||||
<key>StandardOutPath</key>
|
||||
<string>${logs_dir}/cliproxyapi.out.log</string>
|
||||
<string>${logs_dir}/proxypilot-engine.out.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>${logs_dir}/cliproxyapi.err.log</string>
|
||||
<string>${logs_dir}/proxypilot-engine.err.log</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
@@ -68,4 +68,3 @@ launchctl bootstrap "gui/${uid}" "$plist_path"
|
||||
launchctl kickstart -k "gui/${uid}/${label}" >/dev/null 2>&1 || true
|
||||
|
||||
echo "Installed LaunchAgent: $plist_path"
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ if [[ -f "$latest_exe" ]]; then exe="$latest_exe"; fi
|
||||
|
||||
config_path="$repo_root/config.yaml"
|
||||
logs_dir="$repo_root/logs"
|
||||
stdout_log="$logs_dir/cliproxyapi.out.log"
|
||||
stderr_log="$logs_dir/cliproxyapi.err.log"
|
||||
stdout_log="$logs_dir/proxypilot-engine.out.log"
|
||||
stderr_log="$logs_dir/proxypilot-engine.err.log"
|
||||
pid_file="$logs_dir/cliproxyapi.pid"
|
||||
|
||||
mkdir -p "$logs_dir"
|
||||
@@ -61,4 +61,3 @@ echo "$pid" >"$pid_file"
|
||||
|
||||
echo "Started (PID $pid). Tail logs:"
|
||||
echo " tail -f \"$stdout_log\""
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ This will:
|
||||
- Restart: `powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\restart-cliproxy.ps1`
|
||||
|
||||
Logs:
|
||||
- `logs\cliproxyapi.out.log`
|
||||
- `logs\cliproxyapi.err.log`
|
||||
- `logs\proxypilot-engine.out.log`
|
||||
- `logs\proxypilot-engine.err.log`
|
||||
|
||||
## Auto-start at logon (Windows)
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ function Get-RepoRoot {
|
||||
|
||||
$repoRoot = Get-RepoRoot
|
||||
$outDir = Join-Path $repoRoot "bin"
|
||||
$outPath = Join-Path $outDir "cliproxyapi-latest.exe"
|
||||
$outPath = Join-Path $outDir "proxypilot-engine.exe"
|
||||
$compatPath = Join-Path $outDir "cliproxyapi-latest.exe"
|
||||
|
||||
if (-not (Test-Path -LiteralPath $outDir)) {
|
||||
New-Item -ItemType Directory -Path $outDir | Out-Null
|
||||
@@ -15,10 +16,12 @@ if (-not (Test-Path -LiteralPath $outDir)) {
|
||||
|
||||
Write-Host "Building CLIProxyAPI..."
|
||||
Write-Host " out: $outPath"
|
||||
Write-Host " compat: $compatPath"
|
||||
|
||||
Push-Location $repoRoot
|
||||
try {
|
||||
go build -o $outPath .\cmd\server
|
||||
Copy-Item -Force -LiteralPath $outPath -Destination $compatPath
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
@@ -12,18 +12,19 @@ function Ensure-Dir([string]$Path) {
|
||||
}
|
||||
|
||||
$repoRoot = Get-RepoRoot
|
||||
$defaultExePath = Join-Path $repoRoot "bin\\cliproxyapi.exe"
|
||||
$preferredExePath = Join-Path $repoRoot "bin\\proxypilot-engine.exe"
|
||||
$latestExePath = Join-Path $repoRoot "bin\\cliproxyapi-latest.exe"
|
||||
$exePath = if (Test-Path -LiteralPath $latestExePath) { $latestExePath } else { $defaultExePath }
|
||||
$defaultExePath = Join-Path $repoRoot "bin\\cliproxyapi.exe"
|
||||
$exePath = if (Test-Path -LiteralPath $preferredExePath) { $preferredExePath } elseif (Test-Path -LiteralPath $latestExePath) { $latestExePath } else { $defaultExePath }
|
||||
$configPath = Join-Path $repoRoot "config.yaml"
|
||||
$logsDir = Join-Path $repoRoot "logs"
|
||||
Ensure-Dir $logsDir
|
||||
|
||||
$stdoutLog = Join-Path $logsDir "cliproxyapi.out.log"
|
||||
$stderrLog = Join-Path $logsDir "cliproxyapi.err.log"
|
||||
$stdoutLog = Join-Path $logsDir "proxypilot-engine.out.log"
|
||||
$stderrLog = Join-Path $logsDir "proxypilot-engine.err.log"
|
||||
|
||||
if (-not (Test-Path -LiteralPath $exePath)) {
|
||||
throw "Binary not found: $exePath. Build it with: go build -o bin\\cliproxyapi.exe .\\cmd\\server (or: scripts\\build-cliproxyapi.ps1)."
|
||||
throw "Binary not found: $exePath. Build it with: scripts\\windows\\build-cliproxyapi.ps1"
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $configPath)) {
|
||||
throw "Config not found: $configPath"
|
||||
@@ -45,7 +46,7 @@ if ($existing) {
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Starting CLIProxyAPI..."
|
||||
Write-Host "Starting ProxyPilot Engine..."
|
||||
Write-Host " exe: $exePath"
|
||||
Write-Host " config: $configPath"
|
||||
Write-Host " logs: $logsDir"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$procNames = @("cliproxyapi", "cliproxyapi-latest")
|
||||
$procNames = @("proxypilot-engine", "cliproxyapi", "cliproxyapi-latest")
|
||||
$procs = @()
|
||||
foreach ($name in $procNames) {
|
||||
$procs += @(Get-Process -Name $name -ErrorAction SilentlyContinue)
|
||||
|
||||
Reference in New Issue
Block a user