[darkice] Re: watch darkice errors and restart if necessarily

  • From: JoergSorge <joergsorge@xxxxxxxxx>
  • To: darkice@xxxxxxxxxxxxx
  • Date: Sun, 15 Jan 2012 16:01:40 +0100

Am 15.01.2012 14:17, schrieb Niels Dettenbach:
> Am Samstag, 14. Januar 2012, 23:27:58 schrieb Hungerburg:
>> #!/bin/sh
>> while (true) ; do
>>      echo Start
>>      ping some.net 3>&1 1>&2 2>&3 | grep -q "Network is unreachable"
>>      sleep 2
>> done
> 
> Yes, but i've used some ping check script like this in the past and still got 
> not any possible network problem solved with it.

I understand Hungerburg to use it as follow:
darkice-xy.sh start 3>&1 1>&2 2>&3 | grep -q "failed to write to ring
ruffer"

and not to check the Network.

When the error occurs, then
darkice-xy.sh stop
sleep 2
darkice-xy.sh start

Is this right?

But how can I write the <if then clause> when the error was "greped"?

Regards, Jörg


Other related posts: