summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-05-18 21:50:33 +0200
committerLinus Nordberg <linus@nordberg.se>2015-05-18 21:50:33 +0200
commit631b0bf33561f891feeda7162a04644f245e9515 (patch)
treeb30b475a755ac8b0792d2af02f65703ae7cf78fc
parent5875a80ad0321e892aa7662c80c9cb8660c082fb (diff)
[docker] Parameterise HiddenServicePort in torrc generation.
-rw-r--r--packaging/docker/onion/start.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/packaging/docker/onion/start.sh b/packaging/docker/onion/start.sh
index afc70f7..7a6892e 100644
--- a/packaging/docker/onion/start.sh
+++ b/packaging/docker/onion/start.sh
@@ -1,10 +1,12 @@
#! /bin/sh
+[ -z "${HSPORT}" ] && HSPORT=80
+
if ! [ -e /etc/tor/torrc ]; then
echo "SocksPort 0" >> /etc/tor/torrc
echo "DataDirectory /var/lib/tor" >> /etc/tor/torrc
echo "HiddenServiceDir /var/lib/tor/hs" >> /etc/tor/torrc
- echo "HiddenServicePort 80" >> /etc/tor/torrc
+ echo "HiddenServicePort ${HSPORT}" >> /etc/tor/torrc
fi
/usr/bin/tor -f /etc/tor/torrc --user debian-tor