From 529ac19c466e3c1c079d6c8d73d21c3016edae59 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 19 Aug 2013 13:23:51 +0200 Subject: [PATCH 1/1] tor: Only start tor when it has been enabled. --- src/initscripts/init.d/tor | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/initscripts/init.d/tor b/src/initscripts/init.d/tor index e27241f56..4fef577ac 100644 --- a/src/initscripts/init.d/tor +++ b/src/initscripts/init.d/tor @@ -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 -- 2.39.2