Do not remove failed cache file on Nagios mode
Benjamin Renard

Benjamin Renard commited on 2014-12-31 09:50:29
Showing 1 changed files, with 1 additions and 1 deletions.

... ...
@@ -83,7 +83,7 @@ do
83 83
 	if [ -n "$newest" ]
84 84
 	then
85 85
 		[ $DEBUG -eq 1 ] && echo "Newest : $newest"
86
-		rm -f $CACHE_FAILED > /dev/null 2>&1
86
+		[ $NAGIOS -ne 1 ] && rm -f $CACHE_FAILED > /dev/null 2>&1
87 87
 
88 88
 		DOWNLOAD_URL=`cat $tmpfile|grep "$newest"|grep "tar.gz"|head -1|sed 's/.* href="[ \t]*\([^"]*\)[ \t]*" .*$/\1/'`
89 89
 		[ $DEBUG -eq 1 ] && echo "Download URL : $DOWNLOAD_URL"
90 90