mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Start and stop lwresd if the test uses them
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user