- Add start-proxy.sh wrapper that handles nvm/fnm/volta/asdf - Add install-service.sh for one-command installation - Remove hardcoded node version paths from service file
35 lines
1.1 KiB
Bash
Executable File
35 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Install antigravity-claude-proxy as a systemd user service
|
|
# Run from anywhere - automatically detects paths
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
LOCAL_BIN="$HOME/.local/bin"
|
|
SYSTEMD_USER_DIR="$HOME/.config/systemd/user"
|
|
|
|
echo "Installing antigravity-claude-proxy systemd service..."
|
|
|
|
# Create directories if needed
|
|
mkdir -p "$LOCAL_BIN"
|
|
mkdir -p "$SYSTEMD_USER_DIR"
|
|
|
|
# Copy wrapper script
|
|
cp "$SCRIPT_DIR/start-proxy.sh" "$LOCAL_BIN/"
|
|
chmod +x "$LOCAL_BIN/start-proxy.sh"
|
|
echo " Installed: $LOCAL_BIN/start-proxy.sh"
|
|
|
|
# Copy service file
|
|
cp "$SCRIPT_DIR/antigravity-claude-proxy.service" "$SYSTEMD_USER_DIR/"
|
|
echo " Installed: $SYSTEMD_USER_DIR/antigravity-claude-proxy.service"
|
|
|
|
# Reload systemd
|
|
systemctl --user daemon-reload
|
|
echo " Reloaded systemd user daemon"
|
|
|
|
echo ""
|
|
echo "Installation complete. Commands:"
|
|
echo " systemctl --user enable --now antigravity-claude-proxy # Start and enable on boot"
|
|
echo " systemctl --user status antigravity-claude-proxy # Check status"
|
|
echo " journalctl --user -u antigravity-claude-proxy -f # View logs"
|