]> Sergey Matveev's repositories - sgmon.git/blobdiff - run.sh
Ability to set default number of attempts
[sgmon.git] / run.sh
diff --git a/run.sh b/run.sh
index 3bc7a880afae6d37409f4c72ed488228dc100d20..27d72020f79e793186d788930fa2eaefcd87fd77 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -10,7 +10,7 @@ ln -s $SGMONTMP state
 trap "rm -fr state $SGMONTMP" HUP PIPE INT QUIT TERM EXIT
 
 while : ; do
-    [ -s max-attempts ] && read max_attempts < max-attempts || max_attempts=1
+    [ -s max-attempts ] && read max_attempts < max-attempts || max_attempts=$ATTEMPTS_DEFAULT
     [ -s state/attempts ] && read attempts < state/attempts || attempts=0
     [ -x run ] && cmd=./run || cmd="sh -e run"
     if $cmd >state/stdout 2>state/stderr ; then