#!/bin/sh # openldap # Source functions library source /etc/rc.d/init.d/functions log_script_name "$0 $*" DAEMON=/usr/sbin/slapd DAEMON_DESC="LDAP server" DAEMON_OPTS="" piddir=/srv/ldap/run case "$1" in start) cmd_run_log_box_warn "${DAEMON_DESC} start" loadproc ${DAEMON} ;; stop) cmd_run_log_box_warn "${DAEMON_DESC} stop" killproc_path ${DAEMON} ${piddir} ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc_path ${DAEMON} ${piddir} ;; *) echo "Usage: $0 {start|stop|restart|status}" exit ${EXIT_CODE_FAILURE} ;; esac exit $?