summaryrefslogtreecommitdiff
path: root/packaging/docker/onion/start.sh
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-04-19 11:58:28 +0200
committerLinus Nordberg <linus@nordberg.se>2015-04-22 11:22:37 +0200
commit0748083b2e61982108ad8c7375eaa6bef2ea4daa (patch)
treed3f11cfc90bd33b301b63363e458b5edf7c3763a /packaging/docker/onion/start.sh
parent5ba78f137b020f5bc3136a5f72a99a82813210e4 (diff)
Add dockerfile for Tor onion services.
Diffstat (limited to 'packaging/docker/onion/start.sh')
-rw-r--r--packaging/docker/onion/start.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/packaging/docker/onion/start.sh b/packaging/docker/onion/start.sh
new file mode 100644
index 0000000..afc70f7
--- /dev/null
+++ b/packaging/docker/onion/start.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+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
+fi
+
+/usr/bin/tor -f /etc/tor/torrc --user debian-tor