Ablative config

This commit is contained in:
2026-03-03 20:30:29 +00:00
parent 386f6fe928
commit 585e66ceb4
16 changed files with 713 additions and 71 deletions

View File

@@ -9,9 +9,16 @@ command -v node >/dev/null || { echo "Error: node not found"; exit 1; }
command -v npm >/dev/null || { echo "Error: npm not found"; exit 1; }
command -v sudo >/dev/null || { echo "Error: sudo not found"; exit 1; }
# Detect node path and current user
NODE_PATH=$(which node)
CURRENT_USER=$(whoami)
echo "Rocketry Service Installer"
echo "=========================="
echo ""
echo "Node path: $NODE_PATH"
echo "Service user: $CURRENT_USER"
echo ""
# Port prompt
read -p "Port to run on [default: 8080]: " PORT
@@ -165,9 +172,9 @@ After=network.target
[Service]
Type=simple
User=nobody
User=$CURRENT_USER
WorkingDirectory=/opt/rocketry
ExecStart=/usr/bin/node /opt/rocketry/server.js
ExecStart=$NODE_PATH /opt/rocketry/server.js
Environment="PORT=$PORT"
Restart=on-failure
RestartSec=5