Commit 659bdaf3 authored by Brian Wellington's avatar Brian Wellington
Browse files

Start and stop lwresd if the test uses them

parent c8d268ec
......@@ -55,6 +55,34 @@ do
)
done
for d in lwresd*
do
(
cd $d
rm -f lwresd.run &&
if test -f lwresd.pid
then
if kill -0 `cat lwresd.pid` 2>/dev/null
then
echo "$0: lwresd pid `cat lwresd.pid` still running" >&2
exit 1
else
rm -f lwresd.pid
fi
fi
$LWRESD -C resolv.conf -d 99 -g -i lwresd.pid -p 9210 -P 5300 > lwresd.run 2>&1 &
x=1
while test ! -f lwresd.pid
do
x=`expr $x + 1`
if [ $x = 5 ]; then
echo "I: Couldn't start lwresd $d!"
exit 1
fi
sleep 1
done
)
done
# Make sure all of the servers are up.
......
......@@ -31,6 +31,14 @@ do
fi
done
for d in lwresd*
do
pidfile="$d/lwresd.pid"
if [ -f $pidfile ]; then
kill -TERM `cat $pidfile`
fi
done
sleep 5
for d in ns*
......@@ -41,5 +49,13 @@ do
fi
done
for d in lwresd*
do
pidfile="$d/lwresd.pid"
if [ -f $pidfile ]; then
kill -KILL `cat $pidfile`
fi
done
sleep 10
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment