#!/bin/bash
#
# /etc/rc.d/init.d/
# chkconfig: 345 99 1
# description: init script for node's main-loop daemon

# Source function library
. /etc/rc.d/init.d/functions

start() {
	echo "Strating mloopN"
	/home/SYSNODE/mloopN > /dev/null &
	return
}


stop() {
	echo "Shutting down mloopN"
	pkill mloopN
	pkill mserverS
	umount /mnt/tmp
	return
}

case "$1" in
	'start')
		start
	;;

	'stop')
		stop
	;;

	'restart')
		stop
		start
	;;
	
	'status')
		status  mloopN 
	;;

	*)
		echo "Usage:  {start|stop|restart|status}"
		exit 1
	;;

esac
exit $?
