Files
jarvis/deploy/jarvis-arc.service
myron a9ea75db98 Fix Arc Reactor restart: use bash for source, add systemd service, fix deploy
The admin panel restart command used shell_exec which runs /bin/sh (dash on
Ubuntu) — dash doesn't support 'source', so the venv never activated and the
reactor silently never started.

- admin/index.php: wrap restart in bash -c so 'source' works; try systemctl
  first then fall back to nohup
- deploy/jarvis-arc.service: add proper systemd unit so reactor auto-starts
  on boot and auto-restarts on crash
- deploy/jarvis-deploy.sh: install+enable service file when it changes; mkdir
  log dir before restart; fall back to nohup if systemctl not set up yet

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8tDRrQqgLjqXebMCBNcP3
2026-07-01 03:56:11 -05:00

18 lines
456 B
Desktop File

[Unit]
Description=JARVIS Arc Reactor
After=network-online.target mysql.service
Wants=network-online.target
[Service]
Type=simple
WorkingDirectory=/opt/jarvis-arc
ExecStart=/opt/jarvis-arc/venv/bin/python3 /opt/jarvis-arc/reactor.py
Restart=always
RestartSec=10
User=root
StandardOutput=append:/home/jarvis.orbishosting.com/logs/arc_reactor.log
StandardError=append:/home/jarvis.orbishosting.com/logs/arc_reactor.log
[Install]
WantedBy=multi-user.target