diff --git a/README.md b/README.md index f33ed0a..7f1cf71 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Here are a few things to try if you're runing into issues: This project is in no way associated with the Tor Project or their developers. Like many people I'm a fan of Tor and recommend considering ways you can help the project. Consider running a relay, donating, or writing code. -### References - +### Resources +- https://github.com/andrewmichaelsmith/private-tor-network-kube Used some of this work to port to a kubernetes config - https://github.com/chriswayg/tor-server - https://www.torproject.org/docs/tor-relay-debian.html.en diff --git a/scripts/docker-entrypoint b/scripts/docker-entrypoint index 52af8b7..7da85d6 100755 --- a/scripts/docker-entrypoint +++ b/scripts/docker-entrypoint @@ -18,7 +18,10 @@ if [ ! -e /tor-config-done ]; then # Host specific modifications to the torrc file echo -e "DataDirectory ${TOR_DIR}/${TOR_NICKNAME}" >> /etc/tor/torrc - TOR_IP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') + # Updated to handle docker stack/swarm network overlays + TOR_IP=$(ip addr show eth1 | grep "inet" | grep -v '\/32'| awk '{print $2}' | cut -f1 -d'/') + NICS=$(ip addr | grep 'state UP' | awk '{print $2}' | cut -f1 -d':') + if echo "Address ${TOR_IP}" >> /etc/tor/torrc echo -e "ControlPort 0.0.0.0:9051" >> /etc/tor/torrc if [ -z "${TOR_CONTROL_PWD}" ]; then