#! /bin/sh
### BEGIN INIT INFO
# Provides:          epurasd
# Required-Start:    
# Required-Stop:     
# Should-Start:      
# Should-Stop:       
# X-Start-Before:    
# X-Stop-After:      
# Default-Start:     1 2 3 4 5 6
# Default-Stop:      0
# Short-Description: epuras service deamon
### END INIT INFO
DAEMON=/usr/sbin/epurasd
NAME=epurasd
DESC="epuras service deamon"
SCRIPT=epurasd

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

case "$1" in
  start)
	log_begin_msg "Starting $DESC: $DAEMON"	
	start-stop-daemon --start --quiet --oknodo  --exec $DAEMON 
	log_end_msg $?
	;;
  stop)
	log_begin_msg "Stopping $DESC: $DAEMON"	
	start-stop-daemon --stop --quiet --retry 5  --oknodo --exec $DAEMON 
	log_end_msg $?	
	;;
  restart)
	/etc/init.d/$SCRIPT stop
 	/etc/init.d/$SCRIPT start
	;;
  *)
	N=/etc/init.d/${0##*/}
	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
	exit 1
	;;
esac

exit 0
