blob: f080b7588b8e96a92fe3e633b0a631416b8c507f [file] [log] [blame]
Tomáš Peckac5897502020-07-13 16:49:28 +02001[Unit]
2Description=Velia is a health tracking for embedded devices running Linux
3Requires=multi-user.target
4After=multi-user.target
5
6[Service]
7Type=simple
Jan Kundrát5ae67722020-10-29 00:46:10 +01008ExecStartPre=/bin/sh -c 'for COLOUR in red green blue; do echo none > /sys/class/leds/status:$${COLOUR}/trigger; echo 0 > /sys/class/leds/status:green/brightness; done'
Jan Kundráta8b248b2020-11-11 13:21:01 +01009ExecStart=/usr/bin/veliad --log-level=4 --systemd-ignore-unit=systemd-journal-upload.service
Jan Kundrát5ae67722020-10-29 00:46:10 +010010ExecStopPost=/bin/sh -c 'for COLOUR in red green blue; do echo 0 > /sys/class/leds/status:$$COLOUR/brightness; done; [[ "$EXIT_CODE" == "exited" ]] && COLOUR="green" || COLOUR="red"; echo timer > /sys/class/leds/status:$$COLOUR/trigger; echo 256 > /sys/class/leds/status:$$COLOUR/brightness'
Tomáš Peckac5897502020-07-13 16:49:28 +020011PrivateTmp=yes
12PrivateDevices=no
13ProtectSystem=yes
14ProtectHome=yes
15Restart=always
Tomáš Pecka6794a4f2020-08-25 15:03:39 +020016RestartSec=10s
Tomáš Peckac5897502020-07-13 16:49:28 +020017LogRateLimitIntervalSec=10
18LogRateLimitBurst=30000
19SyslogLevel=alert
20
21[Install]
22WantedBy=multi-user.target