blob: d755099a1f0ddbb12aad7ec6ec62ceb2b640e7a9 [file] [log] [blame]
[Unit]
Description=Health tracking of the whole system
Requires=multi-user.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service sysrepo-ietf-alarms.service
After=multi-user.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service sysrepo-ietf-alarms.service
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