unbound/testdata/stream_ssl.tdir/stream_ssl.pre
wouter 8ba25b126a tests in tdir format.
git-svn-id: https://unbound.nlnetlabs.nl/svn/trunk@4264 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 13:27:30 +00:00

30 lines
1.0 KiB
Plaintext

# #-- stream_ssl.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
SERV_PORT=$RND_PORT
CLIE_PORT=$(($RND_PORT + 1))
echo "SERV_PORT=$SERV_PORT" >> .tpkg.var.test
echo "CLIE_PORT=$CLIE_PORT" >> .tpkg.var.test
# make config files
sed -e 's/@SERVPORT\@/'$SERV_PORT'/' -e 's/@CLIEPORT\@/'$CLIE_PORT'/' < stream_ssl.serv.conf > ubserv.conf
sed -e 's/@SERVPORT\@/'$SERV_PORT'/' -e 's/@CLIEPORT\@/'$CLIE_PORT'/' < stream_ssl.clie.conf > ubclie.conf
# start unbound in the background
PRE="../.."
$PRE/unbound -d -v -v -v -v -c ubserv.conf >unboundserv.log 2>&1 &
UNBOUNDSERV_PID=$!
echo "UNBOUNDSERV_PID=$UNBOUNDSERV_PID" >> .tpkg.var.test
$PRE/unbound -d -v -v -v -v -c ubclie.conf >unboundclie.log 2>&1 &
UNBOUNDCLIE_PID=$!
echo "UNBOUNDCLIE_PID=$UNBOUNDCLIE_PID" >> .tpkg.var.test
cat .tpkg.var.test
wait_unbound_up unboundserv.log
wait_unbound_up unboundclie.log