1 # #-- 09-unbound-control.pre--#
2 # source the master var file when it's there
3 [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4 # use .tpkg.var.test for in test variable passing
5 [ -f .tpkg.var.test ] && source .tpkg.var.test
10 FWD_PORT=$(($RND_PORT + 1))
11 CONTROL_PORT=$(($RND_PORT + 2))
12 echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
13 echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
14 echo "CONTROL_PORT=$CONTROL_PORT" >> .tpkg.var.test
18 $LDNS_TESTNS -p $FWD_PORT 09-unbound-control.testns >fwd.log 2>&1 &
20 echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
23 sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' -e 's/@CONTROL_PORT\@/'$CONTROL_PORT'/' < 09-unbound-control.conf > ub.conf
24 # start unbound in the background
26 $PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
28 echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
31 wait_ldns_testns_up fwd.log
32 wait_unbound_up unbound.log