aboutsummaryrefslogtreecommitdiff
path: root/src/dht/dhtu_testbed_deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/dhtu_testbed_deploy.sh')
-rwxr-xr-xsrc/dht/dhtu_testbed_deploy.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dht/dhtu_testbed_deploy.sh b/src/dht/dhtu_testbed_deploy.sh
index 648da7313..e8ac8d5d1 100755
--- a/src/dht/dhtu_testbed_deploy.sh
+++ b/src/dht/dhtu_testbed_deploy.sh
@@ -1,6 +1,9 @@
1#!/bin/bash 1#!/bin/bash
2# This file is in the public domain. 2# This file is in the public domain.
3 3
4# Getting location for temporary files
5GNUNET_TMP="$(gnunet-config -f -s PATHS -o GNUNET_TMP)"
6
4# We will use UDP ports above this number. 7# We will use UDP ports above this number.
5MINPORT=10000 8MINPORT=10000
6 9
@@ -54,13 +57,13 @@ MAX=`expr $1 - 1`
54export GNUNET_FORCE_LOG="dht*;;;;DEBUG" 57export GNUNET_FORCE_LOG="dht*;;;;DEBUG"
55 58
56echo -n "Starting $1 peers " 59echo -n "Starting $1 peers "
57mkdir -p /tmp/deployment 60mkdir -p "$GNUNET_TMP/deployment"
58for n in `seq 0 $MAX` 61for n in `seq 0 $MAX`
59do 62do
60 PORT=`expr $MINPORT + $n` 63 PORT=`expr $MINPORT + $n`
61 CFG="/tmp/deployment/${n}.conf" 64 CFG="$GNUNET_TMP/deployment/${n}.conf"
62 cat dhtu_testbed_deploy.conf | sed -e "s/%N%/$PORT/" > $CFG 65 cat dhtu_testbed_deploy.conf | sed -e "s/%N%/$PORT/" > $CFG
63 gnunet-service-dht -c $CFG -L DEBUG &> /tmp/deployment/$n.log & 66 gnunet-service-dht -c $CFG -L DEBUG &> "$GNUNET_TMP/deployment/$n.log" &
64 echo -n "." 67 echo -n "."
65done 68done
66 69
@@ -85,7 +88,7 @@ fi
85 88
86echo "" 89echo ""
87echo "Network ready. Press ENTER to terminate the testbed!" 90echo "Network ready. Press ENTER to terminate the testbed!"
88echo "Interact with peers using '-c /tmp/deployment/\$N.conf'" 91echo "Interact with peers using '-c $GNUNET_TMP/deployment/\$N.conf'"
89 92
90read 93read
91 94