Restore dns after tunnel down

This commit is contained in:
Eldwan Brianne
2021-03-14 11:56:50 +01:00
parent f0ec423f4d
commit e0f2cae85a
2 changed files with 10 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
TIMESTAMP_FORMAT='%a %b %d %T %Y'
log() {
echo "$(date +"${TIMESTAMP_FORMAT}") [tunnel-up] $*"
echo "$(date +"${TIMESTAMP_FORMAT}") [tunnel-down] $*"
}
# If deluge-pre-stop.sh exists, run it
@@ -15,7 +15,7 @@ fi
echo "Sending kill signal to deluge-daemon"
PID=$(pidof deluged)
kill $PID
kill -9 $PID
# Give deluge-daemon time to shut down
for i in {1..10}; do
ps -p $PID &> /dev/null || break