2 # $Id: slapd-init.in 22295 2007-12-14 05:59:04Z lha $
9 # kill of old slapd if running
10 sh ${srcdir}/slapd-stop > /dev/null
12 SCHEMA_NEEDED="hdb core nis cosine inetorgperson openldap samba"
14 SCHEMA_PATHS="${srcdir}/../../lib/hdb ${srcdir} /etc/ldap/schema /etc/openldap/schema /private/etc/openldap/schema /usr/share/openldap/schema"
16 test -d schema || mkdir schema
18 # setup needed schema files
19 for f in $SCHEMA_NEEDED; do
20 if [ ! -r schema/$f.schema ]; then
21 for d in $SCHEMA_PATHS ; do
22 if [ -r $d/$f.schema ] ; then
23 cp $d/$f.schema schema/$f.schema
27 echo "SKIPPING TESTS: you need the following schema file: $f.schema"
32 touch modules.conf || exit 1
34 slapadd -d 0 -f ${srcdir}/slapd.conf < ${srcdir}/init.ldif || exit 0
37 slapd -d0 -f ${srcdir}/slapd.conf -h ldapi://.%2Fldap-socket &