#!/bin/sh
# description: Start and stop eGTouchD
# processname: eGTouchD
# There is no pid file

NAME=egtouchd
DAEMON=/usr/bin/eGTouchD
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Source function library.

. /lib/init/initmethod-bbinit-functions.sh

# See how we were called.
case "$1" in
  start)
	echo -n "Starting egtouchd: "
	$DEAMON > /dev/null 2>&1

	if [ "$?" = "0" ]; then
		echo "done"
	else
		echo "failed"
		exit 1
	fi
	;;
  stop)
	echo -n "Shutting down egtouchd: "
	$DAEMON -k > /dev/null 2>&1

	if [ "$?" = "0" ]; then
		echo "done"
	else
		echo "failed"
		exit 1
	fi

	;;
  restart|force-reload)
	$0 stop
	$0 start
    	;;
  *)
	N=/etc/init.d/$NAME
	echo "usage: $N {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0
