Now disable ufw at tunnel down after deluge kill and re-enable it at tunnel up

This commit is contained in:
Eldwan Brianne
2021-03-17 10:27:53 +01:00
parent 0376af5593
commit fc974ff463
4 changed files with 14 additions and 6 deletions

View File

@@ -69,7 +69,15 @@ if [[ -n "${LOCAL_NETWORK-}" ]]; then
fi
fi
ufw status
# check if ufw is disabled (re-enable it)
if [[ "${ENABLE_UFW,,}" == "true" ]]; then
ufw status | grep -qw active
if [[ "$?" != "0" ]]; then
log "Re-enabling ufw"
ufw enable
ufw status
fi
fi
log "Starting Deluge"
exec su --preserve-environment abc -s /bin/bash -c "/usr/bin/deluged -d -c /config -L info -l /config/deluged.log" &