aports/main/nagios-plugins/check_openrc
2017-09-26 21:20:11 +02:00

12 lines
177 B
Bash

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