aports/main/nagios-plugins/check_openrc
2021-09-03 23:16:44 +02:00

11 lines
180 B
Bash

#!/bin/sh
# vim: set ts=4:
crashed=$(doas -n rc-status --crashed)
if [ -n "$crashed" ]; then
echo "CRITICAL - crashed services: ${crashed//$'\n'/, }"
exit 2
else
echo 'OK'
fi