[Unit] Description=system-monitor agent guard sidecar After=graphical-session.target # If the guard crash-loops past the restart limit it enters 'failed'; OnFailure # then alerts the user out-of-band (the guard can't deliver its own popups when dead). StartLimitIntervalSec=300 StartLimitBurst=5 OnFailure=agent-guard-failure-notify.service [Service] Type=notify Environment=PYTHONPATH=%h/.local/share/system-monitor/lib Environment=AGENT_GUARD_CONFIG=%h/.local/share/system-monitor/config/agent-guard.toml ExecStart=/usr/bin/python3 -m agent_guard.daemon Restart=always RestartSec=5 MemoryMax=200M ManagedOOMPreference=avoid WatchdogSec=30 [Install] WantedBy=default.target