diff --git a/deploy/hermes-gateway.service b/deploy/hermes-gateway.service new file mode 100644 index 0000000..a1ec138 --- /dev/null +++ b/deploy/hermes-gateway.service @@ -0,0 +1,27 @@ +[Unit] +Description=Hermes Agent Gateway - Messaging Platform Integration +After=network-online.target +Wants=network-online.target +StartLimitIntervalSec=60 + +[Service] +Type=simple +ExecStart=/home/hitonabi/.hermes/hermes-agent/venv/bin/python -m hermes_cli.main gateway run +WorkingDirectory=/home/hitonabi/.hermes +Environment="PATH=/home/hitonabi/.hermes/hermes-agent/venv/bin:/home/hitonabi/.hermes/hermes-agent/node_modules/.bin:/home/hitonabi/.hermes/node/bin:/home/hitonabi/.local/bin:/home/hitonabi/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +Environment="VIRTUAL_ENV=/home/hitonabi/.hermes/hermes-agent/venv" +Environment="HERMES_HOME=/home/hitonabi/.hermes" +Restart=on-failure +RestartSec=5 +RestartForceExitStatus=75 +KillMode=mixed +KillSignal=SIGTERM +ExecReload=/bin/kill -USR1 $MAINPID +ExecStopPost=-/home/hitonabi/.hermes/hermes-agent/venv/bin/python -m gateway.cgroup_cleanup +TimeoutStopSec=210 +StartLimitBurst=3 +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=default.target