On Fri, Jun 3, 2011 at 9:38 PM, Rishab Arora <[email protected]> wrote:

> Hi All,
> I'm trying to build a web based interface to pause rtorrent on my Ubuntu
> Server for 30 minutes every time a person clicks a button.
>
> I'm trying to build this so that my neighbour (who shares my net
> connection) or any other member of my family can surf the web without
> rtorrent hogging up all the bandwidth. But they can't handle an ssh
> connection.
>
> This is what I've done so far:
>
> A python cgi script is executed on clicking a link and then,
> - If rtorrent is not running, it does nothing
> - If rtorrent is running, it executes "kill -2 'pid'" and then "sleep
> 1800;screen -d -m rtorrent"
>
> This actually does the job.
> The problem with my solution is that the rtorrent process then needs to
> belong to the user "www-data" for apache to be able to kill it.
>
> And if this happens, i can't access the screen executing the rtorrent, and
> hence, cannot monitor my downloads.
>
> Any suggestions?
>
>
run rtorrent as www-data user or add a sudo rule with the command for your
user

-Satya

-- 
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer

Reply via email to