[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Start rtorrent on bootup in Squeeze

On 04/07/2011 19:17, Joey Hess wrote:
That is unnecessarily complicated. You can instead use an @reboot
cron job, which can be set up using crontab -e by any user without
root. For example:

@reboot screen -d -m -S rtorrent rtorrent
OK, this sounds really interesting. I've always been thinking of crontab to trigger things periodically. I wanted to ask you for a man page reference but found it before this mail leave my computer: man 5 crontab.

You're right, it is far more simple: no root privileges required, no lock file, no su -, no long script to debug. And rtorrent is is the kind of app that only needs to be started once and live its life.

I can actually see two little cons:
1. no "easy way" to stop rtorrent, but that's not a big deal (any kill/pkill command could do the job for example, just like my script does it), 2. since I like to track my scripts & configs, I massively use git and/or svn and I really love the "one file per functionnality" way of manipulating things. Via crontab, everything is just mixed up into /var/spool/cron/crontabs/<username> and this hard to track and even (afaik) to maintain in a quite automatic way.

However, I will reconsider the use of my sys-v scripts (I wrote two others sys-v scripts for svnserve (Subversion) & git-daemon).

But in the end, this is so sad! I learned many things while writing these scripts! (ok, I'll have time for new things to learn!)

Thank you,

Reply to: