EvoBSD/roles/nagios-nrpe/files/plugins_bsd/check_openvpn

13 lines
352 B
Plaintext
Raw Normal View History

2018-12-28 11:23:49 +01:00
#!/bin/sh
2020-04-21 14:14:49 +02:00
#
2020-04-21 16:15:29 +02:00
# Wrapper of check_openvpn.pl, to use when the server is CARP backup and OpenVPN should not run
2018-12-28 11:23:49 +01:00
2020-04-21 14:14:49 +02:00
carp=$(/sbin/ifconfig carp0 | /usr/bin/grep 'status' |cut -d' ' -f2)
if [ $carp = 'backup' ]; then
echo "No check, I'm a backup"
return 0
2018-12-28 11:23:49 +01:00
else
2020-04-21 14:14:49 +02:00
/usr/local/libexec/nagios/plugins/check_openvpn.pl -H 127.0.0.1 -p 1195 -P PASSWORD
2018-12-28 11:23:49 +01:00
fi