diff options
Diffstat (limited to 'testing/hosts/winnetou/etc/init.d/slapd')
-rwxr-xr-x | testing/hosts/winnetou/etc/init.d/slapd | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/hosts/winnetou/etc/init.d/slapd b/testing/hosts/winnetou/etc/init.d/slapd new file mode 100755 index 000000000..d4c070b33 --- /dev/null +++ b/testing/hosts/winnetou/etc/init.d/slapd @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/strongswan/testing/hosts/winnetou/etc/init.d/slapd,v 1.2 2005/05/31 14:04:43 as Exp $ + +depend() { + need net +} + +start() { + ebegin "Starting ldap-server" + eval start-stop-daemon --start --quiet --pidfile /var/run/openldap/slapd.pid --exec /usr/lib/openldap/slapd -- -u ldap -g ldap "${OPTS}" + eend $? + if [ ! -e /var/lib/openldap-data/objectClass.bdb ] + then + sleep 5 + ldapadd -x -D "cn=Manager, o=Linux strongSwan, c=CH" -w tuxmux -f /etc/openldap/ldif.txt + fi +} + +stop() { + ebegin "Stopping ldap-server" + start-stop-daemon --stop --signal 2 --quiet --pidfile /var/run/openldap/slapd.pid + eend $? +} |