Now disable ufw at tunnel down after deluge kill and re-enable it at tunnel up
This commit is contained in:
@@ -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" &
|
||||
|
@@ -14,7 +14,7 @@ then
|
||||
fi
|
||||
|
||||
log "Sending kill signal to deluge-daemon"
|
||||
PID=$(pidof deluged)
|
||||
PID=$(pidof /usr/bin/python3 /usr/bin/deluged)
|
||||
kill -9 $PID
|
||||
# Give deluge-daemon time to shut down
|
||||
for i in {1..10}; do
|
||||
@@ -29,3 +29,5 @@ then
|
||||
/config/deluge-post-stop.sh "$@"
|
||||
log "/config/deluge-post-stop.sh returned $?"
|
||||
fi
|
||||
|
||||
exec /etc/ufw/disable.sh
|
Reference in New Issue
Block a user