#!/bin/sh # # Version: 1.0 # # chkconfig: 345 82 28 # description: Runs the LDAP daemons # # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting slapd: " touch /var/lock/subsys/slapd daemon --check slapd.conf /usr/local/libexec/slapd -f /usr/local/etc/openldap/slapd.conf -u nobody echo echo -n "Starting slapd2: " daemon --check slapd2.conf /usr/local/libexec/slapd -h ldap://localhost:2345/ -f /usr/local/etc/openldap/slapd2.conf -u nobody echo ;; stop) echo -n "Shutting down slapd: " killproc slapd echo ;; status) status slapd ;; restart) $0 stop $0 start ;; *) echo "Usage: slapd {start|stop|status|restart}" exit 1 esac exit 0