clear
echo "###################################################################################################################"
echo "###################################################################################################################"
echo "## DO NOT CONTINUE unless you know what you are doing                                                            ##"
echo "## This script will recover a host which has self fenced and is operating with HA (HA-Lizard) in suspended mode  ##"
echo "## Before continuing - make sure that the situation that caused the host to fence has been corrected             ##"
echo "## Control + C to exit or <Enter> to continue                                                                    ##"
echo "###################################################################################################################"
echo "###################################################################################################################"
read n1

source /etc/ha-lizard/ha-lizard.init

if [ -a $STATE_PATH/fenced_slave ]
then
	echo "Restoring HA"
	rm -f $STATE_PATH/fenced_slave
	if [ $? -ne 0 ]
	then
		echo "Failed to remove suspened HA state"
		exit 1
	else
		echo "HA operation returned to normal for this host"
		exit 0
	fi
else
	echo "This host's HA operating status is normal - no changes made - exiting"
	exit 1
fi

