From 6d9a8089e73ba301e522c16c212f5757d118a27d Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 28 Apr 2017 17:11:48 +0200 Subject: [PATCH] Add --location parameter in Curl mode to handle redirect --- check_rc_upgrade.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_rc_upgrade.sh b/check_rc_upgrade.sh index 00f3bfc..d212bc1 100755 --- a/check_rc_upgrade.sh +++ b/check_rc_upgrade.sh @@ -126,7 +126,7 @@ do tmpfile=`mktemp` if [ $CURL -eq 1 ] then - curl $CURL_OPTS --silent --output $tmpfile $CHECK_URL + curl $CURL_OPTS --location --silent --output $tmpfile $CHECK_URL else wget $WGET_OPTS $WGET_SSL_OPT -q $CHECK_URL -O $tmpfile fi @@ -202,7 +202,7 @@ then [ $DEBUG -eq 1 ] && echo "Download new release in $DOWNLOAD_FILE" if [ $CURL -eq 1 ] then - curl $CURL_OPTS --silent --output $DOWNLOAD_FILE $DOWNLOAD_URL + curl $CURL_OPTS --location --silent --output $DOWNLOAD_FILE $DOWNLOAD_URL else wget $WGET_OPTS $WGET_SSL_OPT -q -O "$DOWNLOAD_FILE" "$DOWNLOAD_URL" fi