-#! /bin/bash
+#! /bin/sh
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
read foo
fi
KILLPIDS="$PID $KILLPIDS"
- PIDS[$n]="$PID"
+ if [ $n = 1 ]; then
+ MPID="$PID"
+ fi
sleep 1
echo "Using ldapsearch to check that provider slapd is running..."
echo "done"
echo -n "Stopping MMR1 slapd..."
-kill -HUP "${PIDS[1]}"
-wait ${PIDS[1]}
+kill -HUP $MPID
+wait $MPID
+KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $MPID / /"`;
sleep $SLEEP2
echo "done"
echo PID $PID
read foo
fi
-PIDS[1]=$PID
+KILLPIDS="$PID $KILLPIDS"
sleep 1
echo "Using ldapsearch to check that provider slapd is running..."
sleep 5
done
-n=1
-KILLPIDS=
-while [ $n -le 4 ]; do
- KILLPIDS="${PIDS[$n]} $KILLPIDS"
- n=`expr $n + 1`
-done
-
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS