
# chkconfig: 345 20 80
# description: Restores ESwitch configuration.
# processname: restoreeswitchcfg

### BEGIN INIT INFO
# Provides: restoreeswitchcfg
# Required-Start: $local_fs $network $syslog
# Should-Start: 
# Required-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Restores ESwitch configuration
# Description: Restores ESwitch configuration.
### END INIT INFO


start() {

	QAUCLI_LOC=`rpm -ql QConvergeConsoleCLI | grep -i 'qaucli$'`
	if test ! -f $QAUCLI_LOC
	then
		echo qaucli is not installed
	else
		$QAUCLI_LOC -npar -restoreeswitchcfg 
    fi
}

stop() {
	echo restoreeswitchcfg service stopped
}


# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        sleep 3
        start
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart}"
        exit 1
esac


