Stopping all Traffic with Command?

Specific support for Deluge on Microsoft Windows OS
Post Reply
viking
Member
Member
Posts: 14
Joined: Sun Jul 26, 2015 10:41 pm

Stopping all Traffic with Command?

Post by viking »

I am running Deluge Daemon.
I have a script that brings up an alarm when my VPN is no longer active. When this happens, I also want to stop all Deluge Daemon traffic (i.e. down and uploads).
Is there a command, e.g from the command prompt, that I can use to stop and then start the traffic?
User avatar
gderf
Seeder
Seeder
Posts: 155
Joined: Sat Jun 18, 2016 1:32 am

Re: Stopping all Traffic with Command?

Post by gderf »

Best practice would be to kill Deluge entirely when the VPN dies. There are applications that can do this for you such as VPNetMon:

http://vpnetmon.webs.com/

This app can also be configured to restart Deluge when the VPN comes back up, but I would be very careful with that option.
viking
Member
Member
Posts: 14
Joined: Sun Jul 26, 2015 10:41 pm

Re: Stopping all Traffic with Command?

Post by viking »

Thank you for your response;
I already have a Kill switch in my VPN. hover sometimes the VPN manager shuts down randomly.
Most VPN monitors monitors the IP address of the VPN which often changes so that is not a good option for me.

I have my own monitor that checks if the VPN manager is running, and if not, it can take action.

The question, was how to stop the traffic by command. I can kill Deluge by command prompt (in the same way as I kill it from task manager or by one of the VPN monitor programs). However, when I do this, it causes a problem when restarting Deluge; it needs to check all files that were open when the Deluge was killed.

Isn't there a "gentler" way of stopping Deluge Traffic w/o corrupting the file status?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Stopping all Traffic with Command?

Post by Cas »

You don't say exactly how you are killing the process but force killing would cause issues. Are you doing as described here:

http://www.howtogeek.com/145882/how-to- ... n-windows/
viking
Member
Member
Posts: 14
Joined: Sun Jul 26, 2015 10:41 pm

Re: Stopping all Traffic with Command?

Post by viking »

The problem arise when I kill the task from task manager. Wouldn't:

Code: Select all

tskill deluged.exe
also cause issues?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Stopping all Traffic with Command?

Post by Cas »

End task in task manager shouldn't force kill as far as i am aware.

The kill command (without extra options) requests a standard shutdown of deluged.
viking
Member
Member
Posts: 14
Joined: Sun Jul 26, 2015 10:41 pm

Re: Stopping all Traffic with Command?

Post by viking »

I was able to create a rule-set in (free) Comodo Firewall; Deluge traffic is only allowed as long as the VPN is running (regardless of IP address).
Works great :-).
Post Reply