#!/bin/sh
#
# chkconfig: 345 85 15
# description: This is a script to go into /etc/rc.d/init.d in Redhat \
#              Linux 5.2, 6.0 and maybe on other systems as well.
# processname: wipld
# pidfile: /var/run/wipld.pid
# config: /etc/wipld.conf
#
# Based loosely on the httpd script.

# Include Redhat functions for daemon scripts:
. /etc/rc.d/init.d/functions

case "$1" in
  start)
	echo -n "Starting wipld: "
	daemon wipld
	echo
	touch /var/lock/subsys/wipld
	;;
  stop)
	echo -n "Shutting down wipld: "
	[ -f /var/run/wipld.pid ] && {
	    kill `cat /var/run/wipld.pid`
	    echo -n wipld
	}
	echo
	rm -f /var/lock/subsys/wipld
	rm -f /var/run/wipld.pid
	;;
  status)
	status wipld
	;;
  restart)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: $0 {start|stop|restart|status}"
	exit 1
esac

exit 0
