[zopeorg-checkins] CVS: NZO_SiteLayout/rc - ldap.rc.in:1.1

Chris McDonough chrism at zope.com
Fri May 3 15:52:38 EDT 2002


Update of /cvs-zopeorg/NZO_SiteLayout/rc
In directory cvs.zope.org:/tmp/cvs-serv2520/rc

Added Files:
	ldap.rc.in 
Log Message:
Changing ldap stuff for init script as well as adding log rotation to zinstance.


=== Added File NZO_SiteLayout/rc/ldap.rc.in ===
#!/bin/sh
#
# ldap	This shell script takes care of starting and stopping
#	ldap servers (slapd and slurpd).
#
# chkconfig: - 39 61
# description: LDAP stands for Lightweight Directory Access Protocol, used \
#              for implementing the industry standard directory services.
# processname: slapd
# pidfile: /var/run/slapd.pid

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

# Source networking configuration.
. /etc/sysconfig/network

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

BINDIR=<<BIN_DIR>>
ETCDIR=<<LDAP_ETC_DIR>>

[ -f $BINDIR/slapd ] || exit 0

#[ -f $BINDIR/slurpd ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
    start)
        # Start daemons.
        echo -n "Starting ldap: "
	$BINDIR/slapd -f $ETCDIR/slapd.conf -h ldap:///
	RETVAL=$?
        echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ldap
        ;;
    stop)
        # Stop daemons.
	echo -n "Shutting down ldap: "
	killproc slapd 2
	RETVAL=$?
	echo
        if [ $RETVAL -eq 0 ]; then
	    rm -f /var/lock/subsys/ldap
	    rm -f /var/run/slapd.args
	fi
        ;;
    status)
	status slapd
	RETVAL=$?
	;;
    restart)
	$0 stop
	$0 start
	RETVAL=$?
	;;
    reload)
    	killproc -HUP slapd
	RETVAL=$?
	;;
    *)
	echo "Usage: $0 start|stop|restart|status}"
	exit 1
esac

exit $RETVAL






More information about the zopeorg-checkins mailing list