Skip to content

Commit

Permalink
for IPv4 connection for all wget & curl calls
Browse files Browse the repository at this point in the history
- to reduce expose to IPv6 connectivity issues, force all wget and curl commands to connect via IPv4 only
  • Loading branch information
centminmod committed Jul 3, 2017
1 parent 5cd344f commit 38423af
Show file tree
Hide file tree
Showing 63 changed files with 291 additions and 291 deletions.
2 changes: 1 addition & 1 deletion addons/avginstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SRCDIR='/usr/local/src'
CURL_TIMEOUTS=' --max-time 30 --connect-timeout 10'
# avg site blocks lynx calls switch to curl
# AVGDOWNLOADRPM=$(lynx -dump http://free.avg.com/us-en/download-free-all-product | grep 'download.avgfree.com' | grep 'rpm' | awk -F " " '{print $2}')
AVGDOWNLOADRPM=$(curl -s${CURL_TIMEOUTS} http://free.avg.com/us-en/download-free-all-product | grep -o '<a .*href=.*>' | sed -e 's/<a /\n<a /g' | sed -e 's/<a .*href=['"'"'"]//' -e 's/["'"'"'].*$//' -e '/^$/ d' | grep 'download.avgfree.com' | grep 'rpm')
AVGDOWNLOADRPM=$(curl -4s${CURL_TIMEOUTS} http://free.avg.com/us-en/download-free-all-product | grep -o '<a .*href=.*>' | sed -e 's/<a /\n<a /g' | sed -e 's/<a .*href=['"'"'"]//' -e 's/["'"'"'].*$//' -e '/^$/ d' | grep 'download.avgfree.com' | grep 'rpm')
AVGRPMNAME=$(echo ${AVGDOWNLOADRPM##*/})

#########################################################
Expand Down
6 changes: 3 additions & 3 deletions addons/customcurl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if [[ "$CUSTOM_CURLRPM" = [yY] ]]; then
if [[ "$CENTOS_SIX" = '6' && "$(uname -m)" != 'x86_64' ]]; then
#############################
# el6 32bit
curl -sI --connect-timeout 5 --max-time 5 http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel6/i386/city-fan.org-release-1-13.rhel6.noarch.rpm
curl -4Is --connect-timeout 5 --max-time 5 http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel6/i386/city-fan.org-release-1-13.rhel6.noarch.rpm
CURL_NOARCHRPMCHECK=$?
if [[ "$CURL_NOARCHRPMCHECK" = '0' ]]; then
rpm -Uvh http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel6/i386/city-fan.org-release-1-13.rhel6.noarch.rpm
Expand Down Expand Up @@ -136,7 +136,7 @@ if [[ "$CUSTOM_CURLRPM" = [yY] ]]; then
elif [[ "$CENTOS_SIX" = '6' && "$(uname -m)" = 'x86_64' ]]; then
###############################################################
# el6 64bit
curl -sI --connect-timeout 5 --max-time 5 http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
curl -4Is --connect-timeout 5 --max-time 5 http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
CURL_NOARCHRPMCHECK=$?
if [[ "$CURL_NOARCHRPMCHECK" = '0' ]]; then
rpm -Uvh http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
Expand Down Expand Up @@ -167,7 +167,7 @@ if [[ "$CUSTOM_CURLRPM" = [yY] ]]; then
elif [[ "$CENTOS_SEVEN" = '7' && "$(uname -m)" = 'x86_64' ]]; then
###############################################################
# el7 64bit
curl -sI --connect-timeout 5 --max-time 5 http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-1-13.rhel7.noarch.rpm
curl -4Is --connect-timeout 5 --max-time 5 http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-1-13.rhel7.noarch.rpm
CURL_NOARCHRPMCHECK=$?
if [[ "$CURL_NOARCHRPMCHECK" = '0' ]]; then
rpm -Uvh http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-1-13.rhel7.noarch.rpm
Expand Down
6 changes: 3 additions & 3 deletions addons/geoip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fi
rpm -ql GeoIP-devel GeoIP

cd $DIR
# # wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
# # wget -4 http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
# # tar -zxvf GeoIP.tar.gz

# cecho "Download GeoIP.tar.gz ..." $boldyellow
Expand Down Expand Up @@ -116,13 +116,13 @@ rpm -ql GeoIP-devel GeoIP
# ldconfig -v | grep GeoIP

cecho "GeoLiteCity database download ..." $boldyellow
wget -cnv http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -O /usr/share/GeoIP/GeoLiteCity.dat.gz
wget -cnv4 http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -O /usr/share/GeoIP/GeoLiteCity.dat.gz
# gzip -d /usr/local/share/GeoIP/GeoLiteCity.dat.gz
gzip -d -f /usr/share/GeoIP/GeoLiteCity.dat.gz
cp -a /usr/share/GeoIP/GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat

# cp -a /usr/share/GeoIP/GeoIP.dat /usr/share/GeoIP/GeoIP.dat-backup
# wget -cnv http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz -O /usr/share/GeoIP/GeoIP.dat.gz
# wget -cnv4 http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz -O /usr/share/GeoIP/GeoIP.dat.gz
# gzip -df /usr/share/GeoIP/GeoIP.dat.gz

# if [[ "$GEOIPUPDATE" == [yY] ]]; then
Expand Down
2 changes: 1 addition & 1 deletion addons/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ go_install() {
if [ -s go${GO_VERSION}.linux-${GOARCH}.tar.gz ]; then
cecho "go${GO_VERSION}.linux-${GOARCH}.tar.gz Archive found, skipping download..." $boldgreen
else
wget -c --progress=bar https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz --tries=3
wget -c4 --progress=bar https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz --tries=3
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
cecho "Error: go${GO_VERSION}.linux-${GOARCH}.tar.gz download failed." $boldgreen
Expand Down
12 changes: 6 additions & 6 deletions addons/ioncube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,35 @@ cd ioncube
if [[ "$(uname -m)" = 'x86_64' ]]; then
if [[ "$(php -v | awk -F " " '{print $2}' | head -n1 | cut -d . -f1)" != '7' ]]; then
if [[ "$(php -v | awk -F " " '{print $2}' | head -n1 | cut -d . -f1,2)" != '5.6' ]]; then
wget -cnv http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_5.1.2.tar.gz
wget -cnv4 http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_5.1.2.tar.gz
tar xvzf ioncube_loaders_lin_x86-64_5.1.2.tar.gz
elif [[ "$(php -v | awk -F " " '{print $2}' | head -n1 | cut -d . -f1,2)" = '5.6' ]]; then
rm -rf ioncube_loaders_lin_x86-64.tar.gz
rm -rf ioncube
wget -cnv http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
wget -cnv4 http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xvzf ioncube_loaders_lin_x86-64.tar.gz
fi
else
rm -rf ioncube_loaders_lin_x86-64.tar.gz
rm -rf ioncube
wget -cnv http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
wget -cnv4 http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xvzf ioncube_loaders_lin_x86-64.tar.gz
fi
else
if [[ "$(php -v | awk -F " " '{print $2}' | head -n1 | cut -d . -f1)" != '7' ]]; then
if [[ "$(php -v | awk -F " " '{print $2}' | head -n1 | cut -d . -f1,2)" != '5.6' ]]; then
wget -cnv http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86_5.1.2.tar.gz
wget -cnv4 http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86_5.1.2.tar.gz
tar xvzf ioncube_loaders_lin_x86_5.1.2.tar.gz
elif [[ "$(php -v | awk -F " " '{print $2}' | head -n1 | cut -d . -f1,2)" = '5.6' ]]; then
rm -rf ioncube_loaders_lin_x86.tar.gz
rm -rf ioncube
wget -cnv http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
wget -cnv4 http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xvzf ioncube_loaders_lin_x86.tar.gz
fi
else
rm -rf ioncube_loaders_lin_x86.tar.gz
rm -rf ioncube
wget -cnv http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
wget -cnv4 http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xvzf ioncube_loaders_lin_x86.tar.gz
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion addons/maldet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ if [ ! -f /usr/local/sbin/maldet ]; then
if [ -s maldetect-current.tar.gz ]; then
cecho "maldetect-current.tar.gz Archive found, skipping download..." $boldgreen
else
wget -cnv http://www.rfxn.com/downloads/maldetect-current.tar.gz --tries=3
wget -cnv4 http://www.rfxn.com/downloads/maldetect-current.tar.gz --tries=3
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
cecho "Error: maldetect-current.tar.gz download failed." $boldgreen
Expand Down
8 changes: 4 additions & 4 deletions addons/modsecurity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ modsec_install() {

cd $TMP_DIR
if [[ ! -f apr-${APR_VER}.tar.gz ]]; then
wget -cnv http://apache.mirror.uber.com.au//apr/apr-${APR_VER}.tar.gz
wget -cnv4 http://apache.mirror.uber.com.au//apr/apr-${APR_VER}.tar.gz
fi
tar xzf apr-${APR_VER}.tar.gz
cd apr-${APR_VER}
Expand All @@ -78,7 +78,7 @@ modsec_install() {

cd $TMP_DIR
if [[ ! -f apr-util-${APRU_VER}.tar.gz ]]; then
wget -cnv http://apache.mirror.uber.com.au/apr/apr-util-${APRU_VER}.tar.gz
wget -cnv4 http://apache.mirror.uber.com.au/apr/apr-util-${APRU_VER}.tar.gz
fi
tar xzf apr-util-${APRU_VER}.tar.gz
cd apr-util-${APRU_VER}
Expand All @@ -92,7 +92,7 @@ modsec_install() {
cd $TMP_DIR
mkdir modsec_pcre
cd modsec_pcre
wget -cnv $PCRELINK
wget -cnv4 $PCRELINK
tar xzf $PCRELINKFILE
cd pcre-${MODSEC_PCREVER}
make clean
Expand All @@ -104,7 +104,7 @@ modsec_install() {

cd $TMP_DIR
if [[ ! -f modsecurity-${MODSEC_VER}.tar.gz ]]; then
wget -cnv https://www.modsecurity.org/tarball/2.9.0/modsecurity-${MODSEC_VER}.tar.gz
wget -cnv4 https://www.modsecurity.org/tarball/2.9.0/modsecurity-${MODSEC_VER}.tar.gz
fi
tar xvzf modsecurity-${MODSEC_VER}.tar.gz
cd modsecurity-${MODSEC_VER}
Expand Down
6 changes: 3 additions & 3 deletions addons/nodejs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ scl_install() {
installnodejs_new() {
if [[ "$(which node >/dev/null 2>&1; echo $?)" != '0' ]]; then
cd $DIR_TMP
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
curl --silent -4 --location https://rpm.nodesource.com/setup_4.x | bash -
yum -y install nodejs --disableplugin=priorities --disablerepo=epel
npm install npm@latest -g

Expand Down Expand Up @@ -182,7 +182,7 @@ installnodejs() {
if [[ "$CENTOS_SEVEN" = '7' ]]; then
if [[ "$(which node >/dev/null 2>&1; echo $?)" != '0' ]]; then
cd $DIR_TMP
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
curl --silent -4 --location https://rpm.nodesource.com/setup_4.x | bash -
yum -y install nodejs --disableplugin=priorities --disablerepo=epel
npm install npm@latest -g

Expand Down Expand Up @@ -243,7 +243,7 @@ elif [[ "$CENTOS_SIX" = '6' ]]; then
if [ -s node-v${NODEJSVER}.tar.gz ]; then
cecho "node-v${NODEJSVER}.tar.gz Archive found, skipping download..." $boldgreen
else
wget -c --progress=bar http://nodejs.org/dist/v${NODEJSVER}/node-v${NODEJSVER}.tar.gz --tries=3
wget -c4 --progress=bar http://nodejs.org/dist/v${NODEJSVER}/node-v${NODEJSVER}.tar.gz --tries=3
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
cecho "Error: node-v${NODEJSVER}.tar.gz download failed." $boldgreen
Expand Down
4 changes: 2 additions & 2 deletions addons/passenger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ if [[ "$CENTOS_SEVEN" = '7' ]]; then
if [[ "$(which node >/dev/null 2>&1; echo $?)" != '0' ]]; then

cd $DIR_TMP
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
curl --silent -4 --location https://rpm.nodesource.com/setup_4.x | bash -
yum -y install nodejs --disableplugin=priorities --disablerepo=epel
npm install npm@latest -g

Expand Down Expand Up @@ -174,7 +174,7 @@ fi
installnodejs_new() {
if [[ "$(which node >/dev/null 2>&1; echo $?)" != '0' ]]; then
cd $DIR_TMP
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
curl --silent -4 --location https://rpm.nodesource.com/setup_4.x | bash -
yum -y install nodejs --disableplugin=priorities --disablerepo=epel
npm install npm@latest -g

Expand Down
4 changes: 2 additions & 2 deletions addons/rclone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ rclone_install() {
echo "------------------------------------------------"
cd "$DIR_TMP"
rm -rf rclone-*
wget -cnv -O rclone-current-linux-amd64.zip "${BASEURL}/rclone-current-linux-amd64.zip"
wget -cnv4 -O rclone-current-linux-amd64.zip "${BASEURL}/rclone-current-linux-amd64.zip"
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64
\cp -f rclone /usr/sbin/
Expand All @@ -184,7 +184,7 @@ rclone_install() {
echo "------------------------------------------------"
cd "$DIR_TMP"
rm -rf rclone-*
wget -cnv -O rclone-current-linux-386.zip "${BASEURL}/rclone-current-linux-386.zip"
wget -cnv4 -O rclone-current-linux-386.zip "${BASEURL}/rclone-current-linux-386.zip"
unzip rclone-current-linux-386.zip
cd rclone-*-linux-386
\cp -f rclone /usr/sbin/
Expand Down
10 changes: 5 additions & 5 deletions addons/wget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ source_pcreinstall() {
if [ -s "$ALTPCRELINKFILE" ]; then
cecho "$ALTPCRELINKFILE Archive found, skipping download..." $boldgreen
else
wget -c --progress=bar "$ALTPCRELINK" --tries=3
wget -c4 --progress=bar "$ALTPCRELINK" --tries=3
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
cecho "Error: $ALTPCRELINKFILE download failed." $boldgreen
Expand Down Expand Up @@ -333,14 +333,14 @@ source_wgetinstall() {
cecho "$WGET_FILENAME Archive found, skipping download..." $boldgreen
else

curl -sI --connect-timeout 5 --max-time 5 "$WGET_LINK" | grep 'HTTP\/' | grep '200'
curl -4Is --connect-timeout 5 --max-time 5 "$WGET_LINK" | grep 'HTTP\/' | grep '200'
WGET_CURLCHECK=$?
if [[ "$WGET_CURLCHECK" = '0' ]]; then
wget -c --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3
wget -c4 --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3
else
WGET_LINK="$WGET_LINKLOCAL"
echo "wget -c --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3"
wget -c --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3
echo "wget -c4 --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3"
wget -c4 --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3
fi
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
Expand Down
8 changes: 4 additions & 4 deletions addons/wpcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fi

# fallback mirror if official wp-cli download http status is not 200, use local
# centminmod.com mirror download instead
curl -sI --connect-timeout 5 --max-time 5 $WPCLILINK | grep 'HTTP\/' | grep '200' >/dev/null 2>&1
curl -4Is --connect-timeout 5 --max-time 5 $WPCLILINK | grep 'HTTP\/' | grep '200' >/dev/null 2>&1
WPCLI_CURLCHECK=$?
if [[ "$WPCLI_CURLCHECK" != '0' ]]; then
WPCLILINK='https://centminmod.com/centminmodparts/wp-cli/wp-cli.phar'
Expand Down Expand Up @@ -69,7 +69,7 @@ updatewpcli() {

echo "update wp-cli"
rm -rf /usr/bin/wp
wget -cnv --no-check-certificate $WPCLILINK -O /usr/bin/wp --tries=3
wget -cnv4 --no-check-certificate $WPCLILINK -O /usr/bin/wp --tries=3
chmod 0700 /usr/bin/wp
/usr/bin/wp --info --allow-root
echo ""
Expand All @@ -96,7 +96,7 @@ if [ -s /usr/bin/wp ]; then
echo "/usr/bin/wp [found]"
else
echo "Error: /usr/bin/wp not found !!! Downloading now......"
wget -cnv --no-check-certificate $WPCLILINK -O /usr/bin/wp --tries=3
wget -cnv4 --no-check-certificate $WPCLILINK -O /usr/bin/wp --tries=3
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
echo "Error: /usr/bin/wp download failed."
Expand All @@ -115,7 +115,7 @@ if [ -s "${WPCLIDIR}/wp-completion.bash" ]; then
echo "${WPCLIDIR}/wp-completion.bash [found]"
else
echo "Error: ${WPCLIDIR}/wp-completion.bash not found !!! Downloading now......"
wget -cnv --no-check-certificate https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash -O ${WPCLIDIR}/wp-completion.bash --tries=3
wget -cnv4 --no-check-certificate https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash -O ${WPCLIDIR}/wp-completion.bash --tries=3
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
echo "Error: ${WPCLIDIR}/wp-completion.bash download failed."
Expand Down
2 changes: 1 addition & 1 deletion centmin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ sar_call() {

download_cmd() {
HTTPS_AXELCHECK=$(echo "$1" |awk -F '://' '{print $1}')
if [[ "$(curl -Isv $1 2>&1 | egrep 'ECDSA')" ]]; then
if [[ "$(curl -4Isv $1 2>&1 | egrep 'ECDSA')" ]]; then
# axel doesn't natively support ECC 256bit ssl certs
# with ECDSA ciphers due to CentOS system OpenSSL 1.0.2e
echo "ECDSA SSL Cipher BASED HTTPS detected, switching from axel to wget"
Expand Down
4 changes: 2 additions & 2 deletions config/motd/dmotd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fi

ngxver_checker() {
if [[ "$(which nginx >/dev/null 2>&1; echo $?)" = '0' ]]; then
LASTEST_NGINXVERS=$(curl -sL https://nginx.org/en/download.html 2>&1 | egrep -o "nginx\-[0-9.]+\.tar[.a-z]*" | awk -F "nginx-" '/.tar.gz$/ {print $2}' | sed -e 's|.tar.gz||g' | head -n 1 2>&1)
LASTEST_NGINXVERS=$(curl -4sL https://nginx.org/en/download.html 2>&1 | egrep -o "nginx\-[0-9.]+\.tar[.a-z]*" | awk -F "nginx-" '/.tar.gz$/ {print $2}' | sed -e 's|.tar.gz||g' | head -n 1 2>&1)
CURRENT_NGINXVERS=$(nginx -v 2>&1 | awk -F '/' '{print $2}')
if [[ "$CURRENT_NGINXVERS" != "$LASTEST_NGINXVERS" ]]; then
echo
Expand All @@ -142,7 +142,7 @@ gitenv_askupdate() {
# if git remote repo url is not same as one defined in giturl.txt then pull a new copy of
# centmin mod code locally using giturl.txt defined git repo name
GET_GITVER=$(git --version | awk '{print $3}' | sed -e 's|\.||g' | cut -c1,2)
CURL_GITURL=$(curl -s https://raw.githubusercontent.com/centminmod/centminmod/$(awk -F "=" '/branchname=/ {print $2}' ${CMSCRIPT_GITDIR}/centmin.sh | sed -e "s|'||g" )/giturl.txt)
CURL_GITURL=$(curl -s4 https://raw.githubusercontent.com/centminmod/centminmod/$(awk -F "=" '/branchname=/ {print $2}' ${CMSCRIPT_GITDIR}/centmin.sh | sed -e "s|'||g" )/giturl.txt)
# if git version >1.8 use supported ls-remote --get-url flag otherwise use alternative
if [[ -d "${CMSCRIPT_GITDIR}" ]]; then
if [[ "$GET_GITVER" -ge '18' ]]; then
Expand Down
2 changes: 1 addition & 1 deletion config/php-fpm/php-fpm-minond_readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cd /usr/local/etc/
wget http://centminmod.com/phpfpm/php-fpm-minond.conf
wget -4 http://centminmod.com/phpfpm/php-fpm-minond.conf
cp php-fpm.conf php-fpm.conf-backupold
unalias cp
cp -f php-fpm-minond.conf php-fpm.conf
Expand Down
4 changes: 2 additions & 2 deletions inc/axelsetup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ axelsetup() {
echo "rpmforge-release-0.5.3-1.el5.rf.${ARCH}.rpm [found]"
else
echo "Error: rpmforge-release-0.5.3-1.el5.rf.${ARCH}.rpm not found !!! Downloading now......"
wget -cnv https://centminmod.com/centminmodparts/v123/04rpms/${ARCH}/rpmforge-release-0.5.3-1.el5.rf.${ARCH}.rpm --tries=3
wget -cnv4 https://centminmod.com/centminmodparts/v123/04rpms/${ARCH}/rpmforge-release-0.5.3-1.el5.rf.${ARCH}.rpm --tries=3
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
cecho "Error: rpmforge-release-0.5.3-1.el5.rf.${ARCH}.rpm download failed." $boldgreen
Expand Down Expand Up @@ -177,7 +177,7 @@ axelsetup() {
echo "axel-2.4-1.el5.rf.${ARCH}.rpm [found]"
else
echo "Error: axel-2.4-1.el5.rf.${ARCH}.rpm not found !!! Downloading now......"
wget -cnv https://centminmod.com/centminmodparts/v123/04rpms/${ARCH}/axel-2.4-1.el5.rf.${ARCH}.rpm --tries=3
wget -cnv4 https://centminmod.com/centminmodparts/v123/04rpms/${ARCH}/axel-2.4-1.el5.rf.${ARCH}.rpm --tries=3
ERROR=$?
if [[ "$ERROR" != '0' ]]; then
cecho "Error: axel-2.4-1.el5.rf.${ARCH}.rpm download failed." $boldgreen
Expand Down
4 changes: 2 additions & 2 deletions inc/brotli.inc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ libbroti_install() {

LIBBROTLI_LINK='https://github.com/bagder/libbrotli'
# fallback mirror if official github is down, use gitlab mirror
curl -sI --connect-timeout 5 --max-time 5 $LIBBROTLI_LINK | grep 'HTTP\/' | grep '200' >/dev/null 2>&1
curl -4Is --connect-timeout 5 --max-time 5 $LIBBROTLI_LINK | grep 'HTTP\/' | grep '200' >/dev/null 2>&1
LIBBROTLI_CURLCHECK=$?
if [[ "$LIBBROTLI_CURLCHECK" != '0' ]]; then
LIBBROTLI_LINK='https://gitlab.com/centminmod-github-mirror/libbrotli.git'
Expand Down Expand Up @@ -171,7 +171,7 @@ ngxbrotli_download() {

NGXBROTLILINK='https://github.com/google/ngx_brotli'
# fallback mirror if official github is down, use gitlab mirror
curl -sI --connect-timeout 5 --max-time 5 $NGXBROTLILINK | grep 'HTTP\/' | grep '200' >/dev/null 2>&1
curl -4Is --connect-timeout 5 --max-time 5 $NGXBROTLILINK | grep 'HTTP\/' | grep '200' >/dev/null 2>&1
NGXBROTLICURLCHECK=$?
if [[ "$NGXBROTLICURLCHECK" != '0' ]]; then
NGXBROTLILINK='https://gitlab.com/centminmod-github-mirror/ngx_brotli.git'
Expand Down
Loading

0 comments on commit 38423af

Please sign in to comment.