Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


restartd + screen + rtorrent
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

restartd + screen + rtorrent

RoboCotRoboCot Member
edited June 2012 in Help

Do you know how to configure restartd to check and launch rtorrent nested onto a screen session?

Thanks!

Comments

  • yomeroyomero Member
    edited June 2012

    I don't think you need that restartd stuff...
    My rtorrent never has crashed.

    Edit. Otherwhise... if you are paranoic, you can do an script in the way..

    while true
    rtorrent
    done

    And launch it from screen.

  • nice one @yomero

  • i would rather use nohup, more flexible than screen.

  • Thank you all for you answers.

  • i finally made it for @robocot, here's how i did:

    /etc/restartd.conf

    dummylabel "/path/to/rtorrentstart.sh"  "/bin/su -c \"/bin/bash -r -c 'screen -a -A -d -m -S rtorrent /path/to/rtorrentstart.sh\'" username"  ""
    

    /path/to/rtorrentstart.sh (usually something like /home/username/rtorrentstart.sh)

    #!/bin/bash
    rtorrent
    

    restard matches the string you set against process names
    rtorrent is listed just as "rtorrent", if you have more rtorrent's instance (one by user, ie), you need different processname to match the right one, so the need for the shell script wrapper

    just one bug: with screen -d -m (start detached session), i found "C-a", screen's default command character, intercepts any ^char command you send to rtorrent (it doesn't happen with standard screen session)

    I've tried to map command character in screen to something else, with -e options, with no luck at the moment

    using an ui front-end for rtorrent "solves" the issue

    Thanked by 1RoboCot
Sign In or Register to comment.