From: Jan Paul Tuecking Date: Sat, 7 Sep 2013 12:52:02 +0000 (+0200) Subject: tor: changed init script due to directory port option X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=e122dd636659d9e97dcd0441717955de04a737b6;ds=sidebyside tor: changed init script due to directory port option --- diff --git a/src/initscripts/init.d/tor b/src/initscripts/init.d/tor index d631e867f..9c1dfc769 100644 --- a/src/initscripts/init.d/tor +++ b/src/initscripts/init.d/tor @@ -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_DIRPORT}" ] && [ "${TOR_RELAY_DIRPORT}" -ne 0 ]; then + iptables -A TOR_INPUT -p tcp --dport "${TOR_RELAY_DIRPORT}" -j ACCEPT + fi } function flush_firewall() {