summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests/init_slapd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tests/init_slapd.sh')
-rwxr-xr-xsource4/lib/ldb/tests/init_slapd.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/lib/ldb/tests/init_slapd.sh b/source4/lib/ldb/tests/init_slapd.sh
index c50ea0ecab..be3e99365c 100755
--- a/source4/lib/ldb/tests/init_slapd.sh
+++ b/source4/lib/ldb/tests/init_slapd.sh
@@ -8,11 +8,13 @@ fi
rm -rf tests/tmp/db
mkdir -p tests/tmp/db
-if pidof slapd > /dev/null; then
- killall slapd
+if [ -f tests/tmp/slapd.pid ]; then
+ kill `cat tests/tmp/slapd.pid`
+ sleep 1
fi
-sleep 2
-if pidof slapd > /dev/null; then
- killall -9 slapd
+if [ -f tests/tmp/slapd.pid ]; then
+ kill -9 `cat tests/tmp/slapd.pid`
+ rm -f tests/tmp/slapd.pid
fi
+
slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 1