#! /bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin
PROG=/usr/sbin/855resolution
NAME=855resolution
DESC=855resolution

test -x $DAEMON || exit 0

# Include 855resolution defaults if available
if [ -f /etc/default/855resolution ] ; then
	. /etc/default/855resolution
fi
if [ "$MODE" = "" ] || [ "$XRESO" = "" ] || [ "$YRESO" = "" ]; then
   echo "*** Your 855resolution hasn't been configured! ***"
   echo "Please read /usr/share/doc/855resolution/README.Debian and define"
   echo "MODE, XRESO, and YRESO."
   exit 0
fi

set -e

case "$1" in
  start)
	echo -n "Starting $DESC: "
	$PROG $MODE $XRESO $YRESO
	echo "$NAME."
	;;
  stop)
	#echo -n "Stopping $DESC: "
	#echo "$NAME."
	;;
  *)
	N=/etc/init.d/$NAME
	# echo "Usage: $N start" >&2
	echo "Usage: $N start" >&2
	exit 1
	;;
esac

exit 0
