blob: 61b58c13d6eaf7a4b15ac09db61c55d081d35425 [file] [log] [blame]
[Unit]
Description=Health tracking of the whole system
Requires=multi-user.target
After=multi-user.target
ConditionKernelCommandLine=czechlight
[Service]
Type=simple
ExecStartPre=/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'
ExecStart=/usr/bin/veliad-health --appliance=czechlight-clearfog
ExecStopPost=/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'
Group=sysrepo
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=yes
ProtectHome=yes
Restart=always
RestartSec=10s
LogRateLimitIntervalSec=10
LogRateLimitBurst=30000
SyslogLevel=alert
[Install]
WantedBy=multi-user.target