[darkice] Re: Start on boot

  • From: Roland Whitehead <roland@xxxxxxxx>
  • To: darkice@xxxxxxxxxxxxx
  • Date: Tue, 21 Dec 2010 10:43:25 +0000

On 21 Dec 2010, at 08:20, Niels Dettenbach wrote:

> There is a official and generic init script within the darkice sources (file: 
> rc.darkice ).
> 
> - Copy this to your init scripts directory - i.e.:
>       cp ./rc.darkice /etc/init.d/darkice
> 
> You may add a cron script i.e. each 5 minutes as a watchdog over your darkice:
> 
> */5 * * * *     root    /etc/init.d/darkice restartifdown

Your init.d script is very similar to my own but I've adopted yours now as 
standard. The only mod I've made is to add "-f" on the rm $pidfile lines 
because it was asking for confirmation before deleting. I also added "($PID)" 
at the end of the warning about the dead PID because I find that useful in 
debugging what is happening.

The restartifdown is the only bit I didn't have and it's a nice touch - 
especially when coupled with the cron.

The jury is still out about if it works or not. We have two encoders - it works 
on boot on one but not on the other... Will continue to delve in but clearly 
it's something to do with the box and not the script!



Roland
-- 
QURU Ltd, London

Other related posts: