On 12/12/2011 11:05 PM, Jasper Noë wrote:
>> while [ true ]; do
>
> is niet correct, moet zijn:
>
> while true; do ... etc.
"while [ true ]; do" doet het evengoed als "while [ false ]; do" maar op
een wat oneigenlijke manier inderdaad, want dit doet het ook evengoed:
"while [ bruinbrood ]; do".
G
while [ true ]; do
is niet correct, moet zijn:
while true; do ... etc.
--Jasper.
--
To UNSUBSCRIBE, email to debian-user-dutch-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Op 12-12-11 15:31, Heiko schreef:
> On 2011-12-12 15:10, Paul van der Vlis wrote:
>> Op 12-12-11 10:35, Mark Stunnenberg schreef:
>>> Geen idee betreft zo'n tool, ik maak altijd een while true loopje
>>>
>>> maxcrash=10;
>>> count=0
>>> while [ true ]; do
>>> /usr/local/bin/app
>>> echo "crashed"
Op 12-12-11 16:04, Mark Stunnenberg schreef:
> Zoiets dan?
>
> valid_crash=10
> maxcrash=10
> count=0
> while [ true ]; do
> starttime=`date +'%s'`
> /usr/local/bin/app
> endtime=`date +'%s'`
> echo "crashed" | mail -s "app crashed" n...@domain.com
> difftime=$(($endtime - $starttime))
>
Zoiets dan?
valid_crash=10
maxcrash=10
count=0
while [ true ]; do
starttime=`date +'%s'`
/usr/local/bin/app
endtime=`date +'%s'`
echo "crashed" | mail -s "app crashed" n...@domain.com
difftime=$(($endtime - $starttime))
if [ $difftime -lt $valid_crash ]; then
count=$(($count+1))
On 2011-12-12 15:10, Paul van der Vlis wrote:
Op 12-12-11 10:35, Mark Stunnenberg schreef:
Geen idee betreft zo'n tool, ik maak altijd een while true loopje
maxcrash=10;
count=0
while [ true ]; do
/usr/local/bin/app
echo "crashed" | mail -s "app crashed" n...@domain.com
count=$(($count+1))
Beste Paul,
> Ik ben op zoek naar een *simpel* commandline programmaatje waarmee
> ik iets kan starten, en indien dit crasht het automatisch weer
> herstart wordt. Mocht dit crashen steeds weer gebeuren dan moet hij
> toch ophouden, want je kunt niet blijven herstarten. Het zou prettig
> zijn als
Op 12-12-11 10:35, Mark Stunnenberg schreef:
> Geen idee betreft zo'n tool, ik maak altijd een while true loopje
>
> maxcrash=10;
> count=0
> while [ true ]; do
> /usr/local/bin/app
> echo "crashed" | mail -s "app crashed" n...@domain.com
> count=$(($count+1))
> if [ $count -gt $maxcrash ]; th
Geen idee betreft zo'n tool, ik maak altijd een while true loopje
maxcrash=10;
count=0
while [ true ]; do
/usr/local/bin/app
echo "crashed" | mail -s "app crashed" n...@domain.com
count=$(($count+1))
if [ $count -gt $maxcrash ]; then
echo "maxcrash" | mail -s "app max crash" n...@domain.com