refactor: remove automatic service/task installation from Linux, macOS, and Windows setup scripts.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# ZeroGravity — macOS setup
|
||||
# Installs a launchd plist for automatic startup and sets up config directories.
|
||||
# Checks prerequisites, sets up config directories, and builds the release binary.
|
||||
# No UID isolation on macOS — runs in headless/HTTPS_PROXY mode only.
|
||||
set -euo pipefail
|
||||
|
||||
@@ -44,50 +44,9 @@ if [ -z "$LS_BINARY" ] || [ ! -f "$LS_BINARY" ]; then
|
||||
fi
|
||||
echo " Found: $LS_BINARY"
|
||||
|
||||
# ── 4. Launchd plist ──
|
||||
echo "→ Installing launchd plist…"
|
||||
PLIST_DIR="$HOME/Library/LaunchAgents"
|
||||
PLIST="$PLIST_DIR/com.zerogravity.proxy.plist"
|
||||
mkdir -p "$PLIST_DIR"
|
||||
cat > "$PLIST" << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.zerogravity.proxy</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>$PROJECT_DIR/target/release/zerogravity</string>
|
||||
</array>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>$PROJECT_DIR</string>
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
<key>RUST_LOG</key>
|
||||
<string>info</string>
|
||||
</dict>
|
||||
<key>KeepAlive</key>
|
||||
<dict>
|
||||
<key>SuccessfulExit</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>StandardOutPath</key>
|
||||
<string>$HOME/Library/Logs/zerogravity.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>$HOME/Library/Logs/zerogravity.log</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
echo " Installed: $PLIST"
|
||||
echo " Start with: launchctl load $PLIST"
|
||||
echo " Stop with: launchctl unload $PLIST"
|
||||
|
||||
# ── 5. Build ──
|
||||
# ── 4. Build ──
|
||||
echo "→ Building release binary…"
|
||||
cd "$PROJECT_DIR"
|
||||
cargo build --release 2>&1 | tail -1
|
||||
echo ""
|
||||
echo "✓ Setup complete."
|
||||
echo " Start with: launchctl load $PLIST"
|
||||
echo " Or manually: zg start"
|
||||
echo "✓ Setup complete. Start with: zg start"
|
||||
|
||||
Reference in New Issue
Block a user