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)
|
|
|
|
|
2022-06-16 17:25:52 +02:00
|
|
|
if [ "$carp" = 'backup' ]; then
|
2020-04-21 14:14:49 +02:00
|
|
|
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
|