summaryrefslogtreecommitdiff
path: root/packaging/docker/onion/start.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/docker/onion/start.sh')
-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