Debian Codegraph @

testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre

raw
1 # #-- 10-unbound-anchor.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
6
7 . ../common.sh
8 PRE="../.."
9 get_random_port 2
10 PETAL_PORT=$RND_PORT
11 FWD_PORT=$(($RND_PORT + 1))
12 echo "PETAL_PORT=$PETAL_PORT" >> .tpkg.var.test
13 echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
14
15 get_make
16 (cd $PRE; $MAKE petal)
17
18 # start forwarder
19 get_ldns_testns
20 $LDNS_TESTNS -p $FWD_PORT 10-unbound-anchor.testns >fwd.log 2>&1 &
21 FWD_PID=$!
22 echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
23
24 # start https daemon
25 $PRE/petal -v -a "127.0.0.1" -p $PETAL_PORT >petal.log 2>&1 &
26 PETAL_PID=$!
27 echo "PETAL_PID=$PETAL_PID" >> .tpkg.var.test
28 cat .tpkg.var.test
29 sed -e "s/@TOPORT@/$FWD_PORT/" < 10-unbound-anchor.conf > ub.conf
30
31 wait_ldns_testns_up fwd.log
32 wait_petal_up petal.log
33