mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-26 04:25:00 +00:00
Less picky detecting vpn down
This commit is contained in:
parent
bf8b282876
commit
fcedf0d6eb
@ -90,8 +90,8 @@ if [ -e /proc/$qbpid ]; then
|
||||
fi
|
||||
fi
|
||||
while true; do
|
||||
sleep 60 #check once per minute if VPN is up
|
||||
ping -I tun0 -c 1 8.8.8.8 > /dev/null && VPNUP=true || VPNUP=false
|
||||
sleep 120 #check once every couple minutes if VPN is up
|
||||
ping -I tun0 -c 10 8.8.8.8 > /dev/null && VPNUP=true || VPNUP=false
|
||||
if [[ $VPNUP == false ]]; then
|
||||
echo "[crit] VPN down, shutting down docker (turn on auto restart to reconnect)" | ts '%Y-%m-%d %H:%M:%.S'
|
||||
exit 5
|
||||
|
Loading…
Reference in New Issue
Block a user