tor: changed init script due to directory port option
authorJan Paul Tuecking <earl@ipfire.org>
Sat, 7 Sep 2013 12:52:02 +0000 (14:52 +0200)
committerJan Paul Tuecking <earl@ipfire.org>
Sat, 7 Sep 2013 12:52:02 +0000 (14:52 +0200)
src/initscripts/init.d/tor

index d631e867f915e123e918383b3c9caa86af1e5a71..9c1dfc769285f282a926eca8ef230456e6652fff 100644 (file)
@@ -22,6 +22,10 @@ function setup_firewall() {
        if [ "${TOR_RELAY_ENABLED}" = "on" -a -n "${TOR_RELAY_PORT}" ]; then
                iptables -A TOR_INPUT -p tcp --dport "${TOR_RELAY_PORT}" -j ACCEPT
        fi
        if [ "${TOR_RELAY_ENABLED}" = "on" -a -n "${TOR_RELAY_PORT}" ]; then
                iptables -A TOR_INPUT -p tcp --dport "${TOR_RELAY_PORT}" -j ACCEPT
        fi
+
+       if [ "${TOR_RELAY_ENABLED}" = "on" -a -n "${TOR_RELAY_DIRPORT}" ] && [ "${TOR_RELAY_DIRPORT}" -ne 0 ]; then
+               iptables -A TOR_INPUT -p tcp --dport "${TOR_RELAY_DIRPORT}" -j ACCEPT
+       fi
 }
 
 function flush_firewall() {
 }
 
 function flush_firewall() {