You are not logged in.
Pages: 1
the wiki page on rtorrent (http://wiki.archlinux.org/index.php/Rtorrent) describes a script to start the client as a "daemon". by storing the script in the /etc/rc.d/ directory, the user can execute "/etc/rc.d/rtorrent start" with the following consequences:
1) switching user to "rtorrent"
2) executing "/usr/bin/rtorrent" in a screen session
3) adding a new file in the "/var/run/daemons/" directory
i can see how point 1) is justified as a security measure. i am fairly certain that screen session is like a "nohup" in that it detaches the execution of rtorrent from the terminal session which is necessary for any server or "daemon" process but i dont know why it would be prefferable to run a script which starts screen and runs rtorrent in that over "nohup <script which starts rtorrent>". also, it seems fairly easy to re-attach to the screen session after the terminal is closed, which makes the script complete after point 2) so i would like to know what is the reason for point 3)? TIA
Last edited by poopship21 (2009-08-02 17:25:46)
Offline
/var/run/daemons/ is the daemons' home. You can start / stop / restart your rtorrent daemon just like any other.
'nohup' works great locally, I don't use screen and remote guys so I can't say how is it working remotely.
Offline
It's simply a matter of choice. You prefer to use nohup, whoever wrote the script likes screen. add_daemon is there because it's a necessary function in any script that will be run from /etc/rc.d, as per the official prototype /usr/share/pacman/rc-script.proto.
Offline
thanks all, thats very helpful.
Offline
Pages: 1