You are not logged in.

#1 2009-03-28 15:11:14

Atragor
Member
Registered: 2009-02-28
Posts: 59

[SOLVED] rtorrent&screen don't start at boot time

Hello. I use rc-script from ArchWiki to start screen with rtorrent (http://wiki.archlinux.org/index.php/RTo … ith_screen), but at boot time neither rtorrent nor screen start, although script prints "[DONE]". If I login as root and start script manually it works perfect, but I can't understand why it doesn't start automatically.
Please, help.

P.S. Of course script was added to DAEMONS array in rc.conf.

Last edited by Atragor (2009-03-29 11:56:10)

Offline

#2 2009-03-28 16:51:25

jordz
Member
Registered: 2006-02-01
Posts: 248

Re: [SOLVED] rtorrent&screen don't start at boot time

Why  not add

su - <username> -c "screen -d -m"

in your /etc/rc.local?

Offline

#3 2009-03-28 17:51:01

Atragor
Member
Registered: 2009-02-28
Posts: 59

Re: [SOLVED] rtorrent&screen don't start at boot time

I tried to add

/etc/rc.d/rtorrent start

to rc.local and it didn't work. I'll try your suggestion, though I don't see any difference between placing this command in rc.local or in separate script inside rc.d.

Offline

#4 2009-03-28 18:16:45

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: [SOLVED] rtorrent&screen don't start at boot time

Did you make the script executable? (I know that's likely to have already been tried.)

Since your executing it was root when you start up, permissions to trigger it shouldn't be an issue...

Well other than the blazingly obvious suggestion, I do not know.  I have never made a daemon out of a program like that...   Does screen have a daemon mode? Perhaps you missed a flag on the command in your script.


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#5 2009-03-28 21:01:57

Atragor
Member
Registered: 2009-02-28
Posts: 59

Re: [SOLVED] rtorrent&screen don't start at boot time

jordz, adding command to rc.local didn't change anything.

LeoSolaris, yes, script is executable, and according to screen's man page:

-d -m      Start screen in "detached" mode. This creates a new session but doesn't  attach  to  it.  This  is  useful  for  system startup scripts.

I think it's something that could be called "daemon mode".

Maybe some environment variables must be set in order to execute screen and rtorrent? I've tried to set HOME manually but it didn't help.

Offline

#6 2009-03-29 11:55:40

Atragor
Member
Registered: 2009-02-28
Posts: 59

Re: [SOLVED] rtorrent&screen don't start at boot time

I've finally found the reason of this behaviour: option "bind" in .rtorrent.rc was set to my public IP address but my VPN connection was always executing after rtorrent, so rtorrent could not bind to non-existing IP-address.

Thank you all for you answers.

Offline

#7 2009-04-03 13:24:27

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: [SOLVED] rtorrent&screen don't start at boot time

Hmm...   I will have to keep that in mind for my server when I start getting it set up.  Thank you for the resolution.


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

Board footer

Powered by FluxBB