|
|
|
|
[Unit]
|
|
|
|
|
Description=OpenClaw Agent Health Monitor
|
|
|
|
|
Documentation=https://docs.openclaw.ai
|
|
|
|
|
After=network-online.target
|
|
|
|
|
Wants=network-online.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
|
|
|
|
User=root
|
|
|
|
|
WorkingDirectory=/root/.openclaw/workspace
|
|
|
|
|
Environment=NODE_ENV=production
|
|
|
|
|
Environment=HOME=/root
|
|
|
|
|
Environment=PATH=/www/server/nodejs/v24.13.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
|
Environment=XDG_RUNTIME_DIR=/run/user/0
|
|
|
|
|
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus
|
|
|
|
|
EnvironmentFile=-/root/.openclaw/workspace/systemd/gateway.env
|
|
|
|
|
|
|
|
|
|
ExecStart=/usr/bin/node /root/.openclaw/workspace/agent-monitor.js
|
|
|
|
|
|
|
|
|
|
Restart=always
|
|
|
|
|
RestartSec=5
|
|
|
|
|
StartLimitInterval=300
|
|
|
|
|
StartLimitBurst=10
|
|
|
|
|
|
|
|
|
|
MemoryMax=512M
|
|
|
|
|
CPUQuota=20%
|
|
|
|
|
|
|
|
|
|
StandardOutput=journal
|
|
|
|
|
StandardError=journal
|
|
|
|
|
SyslogIdentifier=openclaw-monitor
|
|
|
|
|
|
|
|
|
|
NoNewPrivileges=true
|
|
|
|
|
ProtectSystem=strict
|
|
|
|
|
ProtectHome=read-only
|
|
|
|
|
ReadWritePaths=/root/.openclaw/workspace/logs /run/user/0
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|