#!/bin/bash
#you must login as ROOT
#user chn22 must exits in the BUFFER
#chkconfig: 345 99 10
#description: auto start daemon mserverN 
#
case "$1" in
 'start')
	# ustawia sciezke i uruchamia mserverN
	su chn21 -c "cd /home/chn21; ./runserverN";
	su chn21 -c "exit";
	echo "mserverN start";;
 'stop')
	pidof mserverN;
	kill $(pidof mserverN);
	echo "mserverN stop";;
esac

