Hello
I have looked for a while now and unless I am blind to seeing it, I cannot find a plugin to do what I would like it to do unless someone can point me at it, my internet at the moment is dodgy dropping in and out, I use a VPN with Deluge on an old Linux laptop running Linux Mint 17 and it runs 24 hours a day. My problem is that when the internet drops, the VPN disables, but Deluge keeps running, and when the internet comes back on, the VPN does not start automatically so I end up with my Deluge laptop seeding and downloading without a VPN, so what I would like is for Deluge to turn itself off when my internet drops out to save any problems. is this a possibility?
TIA Vapulabis
Deluge and VPN
Re: Deluge and VPN
Search the forum on the word "killswitch"
Re: Deluge and VPN
I created my own killswitch, I created a BASH file called killdeluge.sh and created a cron job to run it
made the file executable (chmod 755)
created a cronjob to run every minute
Code: Select all
#!/bin/bash
if ! (ping -q -c 1 -W 1 8.8.8.8 >/dev/null); then
pkill deluge
fi
created a cronjob to run every minute
Code: Select all
1 * * * * sh /Mine/MyFolder/stopdeluge.sh
Re: Deluge and VPN
unfortunately attempt number one didn’t work so I had to rethink it
moved it to /usr/local/bin and chmod+x
then crontab now reads
and it now works a treat, within 90 seconds of me pulling the internet from the laptop, deluge gets turned off, this is well within the time it takes for my router to be back up running and connected to the internet for it to get a ping, so if we have a power cut or the internet drops out Deluge will not be running when the internet gets back
Code: Select all
#!/bin/bash
if ! (ping -W 1 8.8.8.8 >/dev/null); then
pkill deluge
fi
then crontab now reads
Code: Select all
* * * * * /usr/local/bin/stopdeluge.sh