8ba25b126a
git-svn-id: https://unbound.nlnetlabs.nl/svn/trunk@4264 be551aaa-1e26-0410-a405-d3ace91eadb9
24 lines
683 B
Plaintext
24 lines
683 B
Plaintext
# #-- speed_local.pre--#
|
|
# source the master var file when it's there
|
|
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
|
# use .tpkg.var.test for in test variable passing
|
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
|
|
|
. ../common.sh
|
|
get_random_port 2
|
|
UNBOUND_PORT=$RND_PORT
|
|
FWD_PORT=$(($RND_PORT + 1))
|
|
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
|
|
|
# make config file
|
|
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' < speed_local.conf > ub.conf
|
|
# start unbound in the background
|
|
PRE="../.."
|
|
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
|
|
UNBOUND_PID=$!
|
|
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
|
|
|
cat .tpkg.var.test
|
|
wait_unbound_up unbound.log
|
|
|