tor: Only start tor when it has been enabled.

This commit is contained in:
Michael Tremer
2013-08-19 13:23:51 +02:00
parent e726a4716f
commit 3765eb6179

View File

@@ -9,6 +9,10 @@
. /etc/sysconfig/rc
. ${rc_functions}
function tor_is_enabled() {
[ "${TOR_ENABLED}" = "on" ] || [ "${TOR_RELAY_ENABLED}" = "on" ]
}
function setup_firewall() {
eval $(/usr/local/bin/readhash /var/ipfire/tor/settings)
@@ -27,6 +31,8 @@ function flush_firewall() {
case "${1}" in
start)
tor_is_enabled || exit 0
# Setup firewall.
setup_firewall