#! /bin/sh

NAME=image2d
DESC=$NAME
DAEMON=/usr/bin/$NAME

. /etc/init.d/functions.sh
. /etc/conf.d/$NAME

start_d () {
	start_daemon $DAEMON $IMAGE2D_OPTIONS
}

stop_d () {
	stop_daemon $DAEMON
}

case "$1" in
	start)
		begin "Starting $DESC"
		start_d
		end $?
		;;
	stop)
		begin "Stopping $DESC"
		stop_d
		end $?
		;;
	restart)
		begin "Restarting $DESC"
		stop_d && start_d
		end $?
		;;
	*)
		error "Usage: $0 start|stop|restart"
		;;
esac

exit 0
