EvoBSD/roles/nagios-nrpe/files/plugins_bsd/check_ospfd_simple
Jérémy Dubois f0c4b2f414 Enhance ospfd_simple check
The condition did not work properly
2019-07-22 15:56:35 +02:00

13 lines
326 B
Bash
Executable file

#!/bin/sh
. /usr/local/libexec/nagios/utils.sh
# check if ospfd is running
if ospfctl show 2>&1 | grep -q "ospfctl: connect: /var/run/ospfd.sock: No such file or directory"; then
echo "CRITICAL - OSPFD not running"
exit "$STATE_CRITICAL"
else
echo "OK - OSPFD is running"
exit "$STATE_OK"
fi