mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 20:16:49 +02:00
tor: Only start tor when it has been enabled.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user