25 lines
339 B
Bash
Executable File

#!/bin/bash
source /root/func.sh
lock="rrouter"
locked=$(getLockFile $lock)
if [ "$locked" != "1" ]
then
exit 1
fi
bumped="Bumped: NO"
if [ -e /tmp/rrouter_bumped ]
then
bumped="Bumped: YES"
fi
stat=`tail -n 1 /root/keepalived.log | grep "Status"`
if [ $? -eq 0 ]
then
echo "$stat&$bumped"
fi
unlock_exit $? $lock $locked