From 631b0bf33561f891feeda7162a04644f245e9515 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 18 May 2015 21:50:33 +0200 Subject: [docker] Parameterise HiddenServicePort in torrc generation. --- packaging/docker/onion/start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packaging') 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 -- cgit v1.1