Updated scripts based on latest release of docker-transmission-openvpn, updated Dockerfile, fetches now vpn config externally

This commit is contained in:
Eldwan Brianne
2021-10-03 18:47:35 +02:00
parent 9f0bc3c941
commit 3a04130588
10504 changed files with 735 additions and 772708 deletions

View File

@@ -13,15 +13,32 @@ then
log "/config/deluge-pre-stop.sh returned $?"
fi
log "Sending kill signal to deluge-web"
PID=$(pgrep deluge-web)
kill "$PID"
log "Sending kill signal to deluge-daemon"
PID=$(pidof /usr/bin/python3 /usr/bin/deluged)
kill -9 $PID
# Give deluge-daemon time to shut down
for i in {1..10}; do
ps -p $PID &> /dev/null || break
sleep .2
PID=$(pgrep deluged)
kill "$PID"
# Give deluged some time to shut down
DELUGE_TIMEOUT_SEC=${DELUGE_TIMEOUT_SEC:-5}
for i in $(seq "$DELUGE_TIMEOUT_SEC")
do
sleep 1
[[ -z "$(pgrep deluged)" ]] && break
[[ $i == 1 ]] && echo "Waiting ${DELUGE_TIMEOUT_SEC}s for deluged to die"
done
# Check whether deluged is still running
if [[ -z "$(pgrep deluged)" ]]
then
echo "Successfuly closed deluged"
else
echo "Sending kill signal (SIGKILL) to deluged"
kill -9 "$PID"
fi
# If deluge-post-stop.sh exists, run it
if [[ -x /config/deluge-post-stop.sh ]]
then