mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
When running under systemd, the gateway could enter restart loops in two scenarios: 1. The previous gateway process hasn't fully exited when systemd starts a new one, causing 'Gateway already running (PID ...)' → exit 1 → restart → same error → infinite loop. 2. The interactive CLI exits immediately in non-TTY mode, and systemd keeps restarting it. Changes: - Add --replace flag to 'hermes gateway run' that gracefully kills any existing gateway instance (SIGTERM → wait 10s → SIGKILL) before starting, preventing the PID-lock deadlock. - Update the generated systemd unit template to use --replace by default, add ExecStop for clean shutdown, set KillMode=mixed and TimeoutStopSec=15 for proper process management. - Existing behavior (without --replace) is unchanged: still prints the error message and exits, now also mentioning the --replace option. Fixes #576 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| auth.py | ||
| banner.py | ||
| callbacks.py | ||
| clipboard.py | ||
| codex_models.py | ||
| colors.py | ||
| commands.py | ||
| config.py | ||
| cron.py | ||
| doctor.py | ||
| gateway.py | ||
| main.py | ||
| models.py | ||
| pairing.py | ||
| runtime_provider.py | ||
| setup.py | ||
| skills_hub.py | ||
| status.py | ||
| tools_config.py | ||
| uninstall.py | ||