#!/bin/sh
#
# chkconfig: 345 51 49
# description:
#   The program uses the LDAP protocol to talk to X.500.  You will need a
#   LDAP Server installed.
#   You find a LDAP-Server in the package openldap.
#
# processname: web500gw
# config: /etc/sysconfig/network
# config: /etc/web500gw

# Source function library.
. /etc/rc.d/init.d/functions

# Get config.
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
	exit 0
fi

[ -x /usr/sbin/web500gw ] || exit 0
[ -d /etc/web500gw ] || exit 0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting web500gw: "
	daemon web500gw

	echo
	touch /var/lock/subsys/web500gw
	;;
  stop)
	echo -n "Stopping web500gw: "
	killproc web500gw

	echo
	rm -f /var/lock/subsys/web500gw
	;;
  status)
	status web500gw
	;;
  reload)
	$0 stop ; $0 start
	;;
  restart)
	$0 stop ; $0 start
	;;
  *)
	echo "Usage: web500gw {start|stop|status|restart|reload}"
	exit 1
esac

exit 0

