blob: f837b345876761d4b6f6cf44ea1fcf76f6925cb3 [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'
Tomáš Pecka0b6120d2020-08-21 11:21:50 +02009ExecStart=/usr/bin/veliad --log-level=4
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