mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-11-16 19:52:17 -05:00
21 lines
764 B
Desktop File
21 lines
764 B
Desktop File
[Unit]
|
|
Description=Multi-Roomba rover control agent
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=root
|
|
Group=root
|
|
ExecStart=/usr/local/bin/roverd -config /etc/roverd.json
|
|
# roverd cannot report an unexpected exit after its process is already gone.
|
|
# ExecStopPost fills only that gap; ordinary lifecycle messages remain owned by
|
|
# roverd, and SERVICE_RESULT prevents clean stops from being labeled failures.
|
|
ExecStopPost=/bin/sh -c 'if [ "$SERVICE_RESULT" != "success" ]; then /usr/bin/printf "\r\n*** rover alert ***\r\nroverd exited unexpectedly; systemd will restart it.\r\n" > /dev/tty1 || true; fi'
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
AmbientCapabilities=CAP_SYS_TTY_CONFIG CAP_SYS_RAWIO
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|