summaryrefslogtreecommitdiffstats
path: root/main/openldap/slapd.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-13 09:21:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-13 12:08:59 +0000
commit8dcabe07abacad7691729a54967121b3e062f62f (patch)
tree5dc4122b95a3694f2a41681e3c31f552b9e9446a /main/openldap/slapd.initd
parent07985527c3845abdbbddfc085ea3e794585348a2 (diff)
downloadaports-8dcabe07abacad7691729a54967121b3e062f62f.tar.bz2
aports-8dcabe07abacad7691729a54967121b3e062f62f.tar.xz
main/openldap: upgrade to 2.4.30
Diffstat (limited to 'main/openldap/slapd.initd')
-rw-r--r--main/openldap/slapd.initd29
1 files changed, 25 insertions, 4 deletions
diff --git a/main/openldap/slapd.initd b/main/openldap/slapd.initd
index d66af755e..fbea0069e 100644
--- a/main/openldap/slapd.initd
+++ b/main/openldap/slapd.initd
@@ -1,21 +1,42 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2012 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.2 2008/10/14 10:29:44 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd-2.4.28-r1,v 1.2 2012/02/12 21:35:04 robbat2 Exp $
+
+extra_commands="checkconfig"
+pidfile=/var/run/openldap/${SVCNAME}.pid
+
+[ -z "$INSTANCE" ] && INSTANCE="openldap${SVCNAME#slapd}"
depend() {
need net
after firewall
+ before dbus hald avahi-daemon
+ provide ldap
}
start() {
+ if ! checkconfig -Q ; then
+ eerror "There is a problem with your slapd.conf!"
+ return 1
+ fi
+ checkpath -d -o ldap:ldap ${pidfile%/*}
ebegin "Starting ldap-server"
- eval start-stop-daemon --start --pidfile /var/run/openldap/slapd.pid --exec /usr/sbin/slapd -- -u ldap -g ldap "${OPTS}"
+ [ -n "$KRB5_KTNAME" ] && export KRB5_KTNAME
+ eval start-stop-daemon --start \
+ --pidfile ${pidfile} \
+ --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
+ start-stop-daemon --stop --signal 2 --quiet --pidfile ${pidfile}
eend $?
}
+
+checkconfig() {
+ /usr/sbin/slaptest -u "$@" ${OPTS_CONF}
+}