blob: f779bf65d53da232c1a73329657499f8c061be33 [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 --systemd-ignore-unit=systemd-journal-upload.service
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'
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=yes
ProtectHome=yes
Restart=always
RestartSec=10s
LogRateLimitIntervalSec=10
LogRateLimitBurst=30000
SyslogLevel=alert
[Install]
WantedBy=multi-user.target