aboutsummaryrefslogtreecommitdiffstats
path: root/main/nagios-plugins/check_openrc
blob: b21d6baebf71c1af5239752f6f5b8c5d90447e16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/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