Enhance ospfd_simple check

The condition did not work properly
This commit is contained in:
Jérémy Dubois 2019-07-22 15:56:35 +02:00
parent f456e4abf2
commit f0c4b2f414

View file

@ -3,7 +3,7 @@
. /usr/local/libexec/nagios/utils.sh
# check if ospfd is running
if [[ "$(ospfctl show 2>&1)" = *"/var/run/ospfd.sock:"* ]]; then
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