check_keepalived: Add 2nd stat file location
This commit is contained in:
parent
bc49084211
commit
d27b9f4204
|
@ -81,7 +81,7 @@ while [ "$1" != "" ]; do
|
|||
done
|
||||
|
||||
# Config and commands
|
||||
STAT_FILE='/tmp/keepalived.status'
|
||||
STAT_FILE='/var/run/keepalived.status'
|
||||
PID_FILE='/run/keepalived.pid'
|
||||
PID=$("${CAT}" "${PID_FILE}" 2>/dev/null)
|
||||
SERVICE=$("${PG}" keepalived)
|
||||
|
@ -92,9 +92,14 @@ CHECK_HAIP2=$("${IP}" 2>/dev/null addr sh "${IFACE2}" | "${GREP}" "${HAIP2}" | "
|
|||
# Check files are valid
|
||||
if [ ! -e "${STAT_FILE}" ]
|
||||
then
|
||||
if [ -e /tmp/keepalived.status ]
|
||||
then
|
||||
STAT_FILE='/tmp/keepalived.status'
|
||||
else
|
||||
echo "CRITICAL: Generated status file is missing. State could not be determined."
|
||||
exit "${CRITICAL}"
|
||||
fi
|
||||
fi
|
||||
|
||||
FILE_CONT=$("${CAT}" "${STAT_FILE}" 2>/dev/null)
|
||||
|
||||
|
|
Loading…
Reference in a new issue