summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests/init_slapd.sh
blob: c50ea0ecab30849a0e9be941acf9868707071324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh 

if [ -z "$LDBDIR" ]; then
    LDBDIR=`dirname $0`/..
    export LDBDIR
fi

rm -rf tests/tmp/db
mkdir -p tests/tmp/db

if pidof slapd > /dev/null; then
    killall slapd
fi
sleep 2
if pidof slapd > /dev/null; then
    killall -9 slapd
fi
slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 1