blob: ecd8f650a217a6a41a694f63c7d43163e8811bea [file] [log] [blame]
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need net.lo
before hald avahi-daemon
start() {
checkpath -q -d /var/run/openldap/ -o ldap:ldap
if ! checkconfig ; then
eerror "There is a problem with your slapd.conf!"
return 1
ebegin "Starting ldap-server"
eval start-stop-daemon --start --pidfile /var/run/openldap/ --exec /usr/lib/openldap/slapd -- -u ldap -g ldap "${OPTS}"
eend $?
stop() {
ebegin "Stopping ldap-server"
start-stop-daemon --stop --signal 2 --quiet --pidfile /var/run/openldap/
eend $?
checkconfig() {
/usr/sbin/slaptest -u "$@" ${OPTS_CONF}