1 # #-- tcp_conn_limit.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 echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
12 echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
16 $LDNS_TESTNS -p $FWD_PORT tcp_conn_limit.testns >fwd.log 2>&1 &
18 echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
21 sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' < tcp_conn_limit.conf > ub.conf
22 # start unbound in the background
24 $PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
26 echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
29 wait_ldns_testns_up fwd.log
30 wait_unbound_up unbound.log