GeeXboX

rtorrent automatic start

April 8th, 2013

Home Forums GeeXboX for PC rtorrent automatic start

This topic contains 17 replies, has 2 voices, and was last updated by tomlohave 1 year, 5 months ago.

Viewing 15 posts – 1 through 15 (of 18 total)
  • Author
    Posts
  • #6272

    SteMan79
    Member

    I am trying to figure out how to make rtorrent start automatically when I boot geexbox but I cant seem to figure it out.

    I saw the rtorrent.service and I have enabled it, gave it a systemctl start rtorrent and then….nothing
    Status says it running (I think):

    # systemctl status rtorrent
    rtorrent.service – rtorrent daemon
    Loaded: loaded (/lib/systemd/system/rtorrent.service; enabled)
    Active: active (exited) since Tue, 09 Apr 2013 02:20:17 +0000
    Process: 240 ExecStart=/usr/bin/runrtorrent (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/rtorrent.service

    I can use it fine if I do a CTRL+F2 and start rtorrent manually but that is kind of backwards so would really like to have it start automatically.

    Can anyone help me here ?

    #6274

    tomlohave
    Moderator

    do you have a screen process that run rtorrent ?

    rtorrent can’t be daemonized, so that’s the solution I found : use screen.

    you should install rutorrent too. It’s more easy to access rtorrent then :accessing rutorrent can be done using a browser and using : hppt://ip-of-geexbox/rutorrent

    #6278

    SteMan79
    Member

    Well the service thingie calls runrtorrent (saying this from memory as I am not at home right now) and that has the screen command in it. It all looked very much like it should work but then again I am not very familiar with the systemctl stuff.

    #6279

    tomlohave
    Moderator

    so, if you have a screen process, rtorrent is running

    just put some .torrent files in /rtoorent/watch

    then rtorent will begin to download them

    do :

    screen -r rtorrent

    to access rtorrent process

    but use rutorrent. it’s better

    #6280

    tomlohave
    Moderator

    to see if a process is running, you can try :

    ps ax | grep trorrent

    #6281

    SteMan79
    Member

    Nothing was running yesterday but let me try your suggestions tonight, thanks so far! :)

    #6283

    SteMan79
    Member

    Hmm seems I was a little too enthusiastic, I got the rutorrent working (without a connection to rtorrent btw) and thought it would be an idea to update all packages to the latest…bad idea…broken my geexbox.

    Reinstalling now

    #6285

    SteMan79
    Member

    Ok, so we are back again.

    So rutorrent is handy yes, but how should I start rtorrent itself ?

    #6291

    tomlohave
    Moderator

    ok, so I supposed rtorrent is really not running, … do you have package screen installed ?

    #6293

    SteMan79
    Member

    Yup :)

    #6294

    SteMan79
    Member

    Actually I can make rtorrent start by doing a CTRL+F2 and then login and start rtorrent from there but its a bit of a long way.

    Would be nice if I could start it remote using putty or even better have it start automatically in the background at startup (doesn’t need to be a daemon or so)

    #6296

    tomlohave
    Moderator

    what I did :

    # opkg install rtorrent
    Installing rtorrent (0.9.2-1) to root…
    Downloading http://download.geexbox.org/snapshots/geexbox-xbmc-i386-generic/latest/binaries.i386/packages//rtorrent_0.9.2-1_i686.opk.
    Installing screen (4.0.3-1) to root…
    Downloading http://download.geexbox.org/snapshots/geexbox-xbmc-i386-generic/latest/binaries.i386/packages//screen_4.0.3-1_i686.opk.
    Installing libtorrent (0.13.2-1) to root…
    Downloading http://download.geexbox.org/snapshots/geexbox-xbmc-i386-generic/latest/binaries.i386/packages//libtorrent_0.13.2-1_i686.opk.
    Installing libsigcpp (2.2.11-1) to root…
    Downloading http://download.geexbox.org/snapshots/geexbox-xbmc-i386-generic/latest/binaries.i386/packages//libsigcpp_2.2.11-1_i686.opk.
    Installing xmlrpc-c (1.32.05-1) to root…
    Downloading http://download.geexbox.org/snapshots/geexbox-xbmc-i386-generic/latest/binaries.i386/packages//xmlrpc-c_1.32.05-1_i686.opk.
    Configuring screen.
    Configuring libsigcpp.
    Configuring libtorrent.
    Configuring xmlrpc-c.
    Configuring rtorrent.
    # systemctl start rtorrent
    # systemctl status rtorrent
    rtorrent.service – rtorrent daemon
    Loaded: loaded (/lib/systemd/system/rtorrent.service; disabled)
    Active: active (exited) since Wed 2013-04-10 18:07:08 UTC; 6s ago
    Process: 841 ExecStart=/usr/bin/runrtorrent (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/rtorrent.service
    ├─846 /usr/bin/SCREEN -dmS rtorrent rtorrent -n -o import=/etc/rtorrent.rc
    └─847 rtorrent -n -o import=/etc/rtorrent.rc

    # ps ax | grep rtorrent
    846 root    {screen} /usr/bin/SCREEN -dmS rtorrent rtorrent -n -o import=/etc/rtorrent.rc
    847 root    rtorrent -n -o import=/etc/rtorrent.rc
    853 root    grep rtorrent

    and it works …

    #6298

    SteMan79
    Member

    Hmm all precisely how I did it and everything looks the same almost, only I dont get this :

    ├─846 /usr/bin/SCREEN -dmS rtorrent rtorrent -n -o import=/etc/rtorrent.rc
    └─847 rtorrent -n -o import=/etc/rtorrent.rc

    The only difference I see is that your screen command is written with capitals and mine is written in small

    #6299

    tomlohave
    Moderator

    can you try to start a screen session ?

    just execute : screen

    #6300

    SteMan79
    Member

    # screen
    Please set a terminal type.

Viewing 15 posts – 1 through 15 (of 18 total)

You must be logged in to reply to this topic.

Comments are closed.