diff options
Diffstat (limited to 'src/dht/dhtu_testbed_deploy.sh')
-rwxr-xr-x | src/dht/dhtu_testbed_deploy.sh | 11 |
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 | ||
5 | GNUNET_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. |
5 | MINPORT=10000 | 8 | MINPORT=10000 |
6 | 9 | ||
@@ -54,13 +57,13 @@ MAX=`expr $1 - 1` | |||
54 | export GNUNET_FORCE_LOG="dht*;;;;DEBUG" | 57 | export GNUNET_FORCE_LOG="dht*;;;;DEBUG" |
55 | 58 | ||
56 | echo -n "Starting $1 peers " | 59 | echo -n "Starting $1 peers " |
57 | mkdir -p /tmp/deployment | 60 | mkdir -p "$GNUNET_TMP/deployment" |
58 | for n in `seq 0 $MAX` | 61 | for n in `seq 0 $MAX` |
59 | do | 62 | do |
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 "." |
65 | done | 68 | done |
66 | 69 | ||
@@ -85,7 +88,7 @@ fi | |||
85 | 88 | ||
86 | echo "" | 89 | echo "" |
87 | echo "Network ready. Press ENTER to terminate the testbed!" | 90 | echo "Network ready. Press ENTER to terminate the testbed!" |
88 | echo "Interact with peers using '-c /tmp/deployment/\$N.conf'" | 91 | echo "Interact with peers using '-c $GNUNET_TMP/deployment/\$N.conf'" |
89 | 92 | ||
90 | read | 93 | read |
91 | 94 | ||