Change bandwidth limitations via shell command?

General support for problems installing or using Deluge
Post Reply
adamdemuth

Change bandwidth limitations via shell command?

Post by adamdemuth »

I'm slowly but surely setting up a home automation system, and my most recent addition is bluetooth proximity detection, and I'd like to integrate this into my Deluge server. The way it works is that when the paired bluetooth device is within range, a script is ran. When it has been out of range for x seconds, a different script is ran. I'd like to be able to change the bandwidth settings within Deluge from the scripts so when I am at home, the bandwidth limit is lowered, and when I am away and not using the internet, it is increased.

I have to admit, that while I have had some sort of 'nix machine around the house for the past six or seven years, I'm no pro by any means, so I don't know if this is possible. Right now I am running deluge Deluge 1.2.1 on Ubuntu 9.10 server. I poked around a bit, and noticed that there is an option within deluged to change the config file it uses. If I have two config files, can I switch between them on the fly like this:

Code: Select all

deluged --config=/path/slow.conf

Code: Select all

deluged --config=/path/fast.conf
or will that just start another deluge daemon with said .conf file?

Also, how do I safely shutdown deluged? I'm running on decade old hardware, so checking torrents when it's not shut down cleanly takes a very long time. My server is a laptop, so it has it's own (kinda sorta) built-in UPS, but the batteries are so old that I only get 20 minutes of runtime once its unplugged, so I'd like to throw a line into my ACPI to cleanly shut down deluged when I lose power during storms.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Change bandwidth limitations via shell command?

Post by Cas »

you need to use deluge-console as per this post: http://forum.deluge-torrent.org/viewtop ... =7&t=29585
adamdemuth

Re: Change bandwidth limitations via shell command?

Post by adamdemuth »

That's exactly what I needed, thanks!
Post Reply