Files
autarch/scripts/autarch-web.service

35 lines
977 B
SYSTEMD
Raw Permalink Normal View History

2026-03-13 15:17:15 -07:00
[Unit]
Description=AUTARCH Web Dashboard
Documentation=file:///home/snake/autarch/GUIDE.md
After=network.target
Wants=network.target
[Service]
Type=simple
User=root
Group=root
2026-03-13 15:17:15 -07:00
WorkingDirectory=/home/snake/autarch
# Use venv python if available, fall back to system python
ExecStart=/bin/bash -c 'if [ -x /home/snake/autarch/venv/bin/python ]; then exec /home/snake/autarch/venv/bin/python /home/snake/autarch/autarch.py --web --no-banner; else exec /usr/bin/python3 /home/snake/autarch/autarch.py --web --no-banner; fi'
2026-03-13 15:17:15 -07:00
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
SyslogIdentifier=autarch-web
# Security — run as root for raw sockets, iptables, hardware access
2026-03-13 15:17:15 -07:00
NoNewPrivileges=false
ProtectHome=false
PrivateTmp=true
# Capabilities needed when not running as root (future: drop root)
# AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN CAP_NET_BIND_SERVICE
2026-03-13 15:17:15 -07:00
# Environment
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=multi-user.target