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.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/lib/ldb/tests/init_slapd.sh b/source4/lib/ldb/tests/init_slapd.sh
index 67eecb031c..65700f6c18 100755
--- a/source4/lib/ldb/tests/init_slapd.sh
+++ b/source4/lib/ldb/tests/init_slapd.sh
@@ -5,7 +5,11 @@ export PATH=/usr/sbin:$PATH
rm -rf tests/tmp/db
mkdir -p tests/tmp/db
-killall slapd
+if pidof slapd > /dev/null; then
+ killall slapd
+fi
sleep 2
-killall -9 slapd
+if pidof slapd > /dev/null; then
+ killall -9 slapd
+fi
slapadd -f tests/slapd.conf < tests/init.ldif || exit 1