#!/bin/bash # Begin $rc_base/init.d/openldap # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org #$LastChangedBy: bdubbs $ #$Date: 2006-09-10 19:41:47 -0500 (Sun, 10 Sep 2006) $ . /etc/sysconfig/rc . $rc_functions pid_file=/srv/ldap/run/slapd.pid case "$1" in start) boot_mesg "Starting LDAP slapd Server..." PIDFILE="/srv/ldap/run/slapd.pid" loadproc /usr/sbin/slapd ;; stop) boot_mesg "Stopping LDAP slapd Server..." PIDFILE="/srv/ldap/run/slapd.pid" # slapd needs SIGINT killproc -p ${PIDFILE} /usr/sbin/slapd INT ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/slapd ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/openldap