On Mon, Jul 04, 2011 at 11:36:34PM +0200, Nicolas Bercher wrote:
> 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,
> Nicolas
> 


IMHO this is the best way to run screen at boot:

http://rpatterson.net/blog/screen-sessions-at-boot

No root needed. Configurable... what else one may need? In every 
user's screen.rc you can specify what apps user need to be started in 
windows - rtorrent in your case. I tried this and it works perfectly. 
I use it for my 'homemade' poor-man's multimedia centre. An old pc 
running Debian, rtorrent, mediatomb and newsbeuter. Newsbeuter is 
used track eztv rss for new episodes and download torrent files in 
rtorrent watch directory. After download of episode finished - 
rtorrent send mail to my mobile operator mail2sms service and I get 
sms on my mobile that new episode is here and ready to be watched.

Both rtorrent and newsbeuter are inside screen session started at 
boot time.

Best Regards,
yra


--
All texts and all ideas expressed by me
in this  message are covered  by CC-BY-NC-SA-3.0.
http://creativecommons.org/licenses/by-nc-sa/3.0/

Attachment: signature.asc
Description: Digital signature

Reply via email to