mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-10-17 22:15:16 +02:00
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
# #-- auth_load_http.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
|
|
|
|
PRE="../.."
|
|
. ../common.sh
|
|
# if no threads; exit
|
|
if grep -e "define HAVE_PTHREAD 1" -e "define HAVE_SOLARIS_THREADS 1" -e "define HAVE_WINDOWS_THREADS 1" $PRE/config.h; then
|
|
echo "have threads"
|
|
else
|
|
skip_test "no threads"
|
|
fi
|
|
|
|
get_random_port 2
|
|
UNBOUND_PORT=$RND_PORT
|
|
PETAL_PORT=$(($RND_PORT + 1))
|
|
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
|
echo "PETAL_PORT=$PETAL_PORT" >> .tpkg.var.test
|
|
|
|
get_make
|
|
(cd $PRE; $MAKE petal)
|
|
|
|
# start https daemon
|
|
$PRE/petal -v -a "127.0.0.1" -p $PETAL_PORT >petal.log 2>&1 &
|
|
PETAL_PID=$!
|
|
echo "PETAL_PID=$PETAL_PID" >> .tpkg.var.test
|
|
wait_petal_up petal.log
|
|
|
|
# make config file
|
|
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$PETAL_PORT'/' < auth_load_http.conf > ub.conf
|
|
# start unbound in the background
|
|
PRE="../.."
|
|
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
|
|
#valgrind --leak-check=full --show-reachable=yes $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
|