Fix the checkrouter.sh script in order to report the routers state

This commit is contained in:
wilderrodrigues 2015-02-06 13:21:09 +01:00
parent 0a133c06f8
commit e6b3ee318c

View File

@ -44,10 +44,14 @@ then
bumped="Bumped: YES"
fi
stat=`tail -n 1 [RROUTER_LOG] | grep "Status"`
state="Status: BACKUP"
isMaster=`grep -Po '(?<="redundant_master": ")[^"]*' /etc/cloudstack/cmdline.json`
if [ $? -eq 0 ]
then
echo "$stat&$bumped"
if [ "$isMaster" = true ] ; then
state="Status: MASTER"
fi
echo "$state&$bumped"
fi
if [ $nolock -eq 0 ]