root commited on 2015-02-10 09:14:22
Showing 1 changed files, with 2 additions and 2 deletions.
... | ... |
@@ -106,13 +106,13 @@ for i in `seq 1 $MAX_CHECK` |
106 | 106 |
do |
107 | 107 |
tmpfile=`mktemp` |
108 | 108 |
wget -q $CHECK_URL -O $tmpfile |
109 |
- newest=`cat $tmpfile|grep dlversion|grep Complete|head -n 1|sed 's/^.*: \([0-9\.]*\).*$/\1/'` |
|
109 |
+ newest=`cat $tmpfile|grep 'downloads.sourceforge.net'|grep 'complete.tar.gz'|head -n 1|sed 's|^.*downloads.sourceforge.net/project/roundcubemail/roundcubemail/\([^/]*\)/roundcubemail-.*$|\1|'` |
|
110 | 110 |
if [ -n "$newest" ] |
111 | 111 |
then |
112 | 112 |
[ $DEBUG -eq 1 ] && echo "Newest : $newest" |
113 | 113 |
[ $NAGIOS -ne 1 ] && rm -f $CACHE_FAILED > /dev/null 2>&1 |
114 | 114 |
|
115 |
- DOWNLOAD_URL=`cat $tmpfile|grep "$newest"|grep "tar.gz"|head -1|sed 's/.* href="[ \t]*\([^"]*\)[ \t]*" .*$/\1/'` |
|
115 |
+ DOWNLOAD_URL=`cat $tmpfile|grep "$newest"|grep "\-complete.tar.gz"|head -1|sed 's/.* href="[ \t]*\([^"]*\)[ \t]*" .*$/\1/'` |
|
116 | 116 |
[ $DEBUG -eq 1 ] && echo "Download URL : $DOWNLOAD_URL" |
117 | 117 |
[ ! -n "$DOWNLOAD_URL" ] && DOWNLOAD_URL="$CHECK_URL" && [ $DEBUG -eq 1 ] && echo "Use check URL as download URL : $DOWNLOAD_URL" |
118 | 118 |
|
119 | 119 |