#! /bin/sh
#
# wipl-daemon   Startup file for the wipl-daemon (wipld)
#
#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#		Modified for Debian GNU/Linux
#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#		Modified for wipld 
#		by Carlo Contavalli <ccontavalli@debian.org>
#
# This file was automatically customized by dh-make on Tue, 26 Feb 2002 23:11:58 +0100

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/wipld
NAME=wipld
DESC=wipld

test -f $DAEMON || exit 0

case "$1" in
  start)
	echo -n "Starting $DESC: $NAME"
	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
		--exec $DAEMON 
	echo "."
	;;
  stop)
	echo -n "Stopping $DESC: $NAME"
	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
		--exec $DAEMON
	rm -f /var/run/$NAME.pid
  	echo "."
	;;

  restart|force-reload)
	echo -n "Restarting $DESC: $NAME"
	start-stop-daemon --stop --quiet --pidfile \
		/var/run/$NAME.pid --exec $DAEMON
	rm -f /var/run/$NAME.pid
	sleep 1
	start-stop-daemon --start --quiet --pidfile \
		/var/run/$NAME.pid --exec $DAEMON 
	echo "."
	;;

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

exit 0
