blob: cc2e8b7e8a1b0103496fd1bd4cd15b6227e54f81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd,v 1.6 2013/01/15 03:53:28 patrick Exp $
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
fi
ebegin "Starting ldap-server"
eval start-stop-daemon --start --pidfile /var/run/openldap/slapd.pid --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/slapd.pid
eend $?
}
checkconfig() {
/usr/sbin/slaptest -u "$@" ${OPTS_CONF}
}
|