[Unit]
Description=Guanghu state-change-only node sentinel
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
User=guanghu-sentinel
Group=guanghu-sentinel
SupplementaryGroups=guanghu
WorkingDirectory=/opt/guanghu/state-change-sentinel
EnvironmentFile=/etc/guanghu/secrets/mail/qq-authorization.env
Environment=SENTINEL_CONFIG=/etc/guanghu/state-change-sentinel.json
Environment=SENTINEL_STATE=/var/lib/guanghu/state-change-sentinel/state.json
ExecStart=/usr/bin/node /opt/guanghu/state-change-sentinel/sentinel.js
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/guanghu/state-change-sentinel

[Install]
WantedBy=multi-user.target
