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,7 +1,7 @@
#!/usr/bin/env bash
# ZeroGravity — Linux setup
# Creates the zerogravity-ls system user for UID-scoped iptables isolation,
# installs the systemd user service, and builds the dns_redirect.so preload lib.
# Checks prerequisites, creates the zerogravity-ls system user for
# UID-scoped iptables isolation, and builds the release binary.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
@@ -66,33 +66,7 @@ sudo chmod 1777 /tmp/zerogravity-standalone
echo "→ Setting up ~/.config/zerogravity…"
mkdir -p "$HOME/.config/zerogravity"
# ── 6. Systemd user service ──
echo "→ Installing systemd user service…"
UNIT_DIR="$HOME/.config/systemd/user"
mkdir -p "$UNIT_DIR"
cat > "$UNIT_DIR/zerogravity.service" << EOF
[Unit]
Description=ZeroGravity Proxy
After=network.target
[Service]
Type=simple
ExecStart=$PROJECT_DIR/target/release/zerogravity
WorkingDirectory=$PROJECT_DIR
Environment=RUST_LOG=info
Restart=on-failure
RestartSec=3
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
echo " Installed: $UNIT_DIR/zerogravity.service"
echo " Enable with: systemctl --user enable zerogravity"
# ── 7. Build ──
# ── 6. Build ──
echo "→ Building release binary…"
cd "$PROJECT_DIR"
cargo build --release 2>&1 | tail -1