Browse Source

Change mariadb download addr

lj2007331 9 years ago
parent
commit
df9c149083
4 changed files with 11 additions and 15 deletions
  1. 4 4
      backup_setup.sh
  2. 1 1
      functions/mariadb-10.0.sh
  3. 1 1
      functions/mariadb-5.5.sh
  4. 5 9
      functions/upgrade_php.sh

+ 4 - 4
backup_setup.sh

@@ -34,15 +34,15 @@ while :
 do
 	echo
 	echo "Please enter the directory for save the backup file: "
-	read -p "(Default directory: /home/backup): " backup_dir 
-	[ -z "$backup_dir" ] && backup_dir="/home/backup"
-        if [ -z "`echo $backup_dir | grep '^/'`" ]; then
+	read -p "(Default directory: $backup_dir): " NEW_backup_dir 
+	[ -z "$NEW_backup_dir" ] && NEW_backup_dir="$backup_dir"
+        if [ -z "`echo $NEW_backup_dir| grep '^/'`" ]; then
                 echo -e "\033[31minput error! \033[0m"
         else
                 break
         fi
 done
-sed -i "s@^backup_dir=.*@backup_dir=$backup_dir@" ./options.conf
+sed -i "s@^backup_dir=.*@backup_dir=$NEW_backup_dir@" ./options.conf
 
 while :
 do

+ 1 - 1
functions/mariadb-10.0.sh

@@ -16,7 +16,7 @@ fi
 
 echo $public_IP $FLAG_IP
 
-[ "$FLAG_IP"x == "CN"x ] && DOWN_ADDR=http://mirrors.aliyun.com/mariadb || DOWN_ADDR=https://downloads.mariadb.org/f
+[ "$FLAG_IP"x == "CN"x ] && DOWN_ADDR=http://mirrors.ustc.edu.cn/mariadb || DOWN_ADDR=https://downloads.mariadb.org/f
 [ -d "/lib64" ] && { SYS_BIT_a=x86_64;SYS_BIT_b=x86_64; } || { SYS_BIT_a=x86;SYS_BIT_b=i686; }
 LIBC_VERSION=`getconf -a | grep GNU_LIBC_VERSION | awk '{print $NF}'`
 LIBC_YN=`echo "$LIBC_VERSION < 2.14" | bc`

+ 1 - 1
functions/mariadb-5.5.sh

@@ -16,7 +16,7 @@ fi
 
 echo $public_IP $FLAG_IP
 
-[ "$FLAG_IP"x == "CN"x ] && DOWN_ADDR=http://mirrors.aliyun.com/mariadb || DOWN_ADDR=https://downloads.mariadb.org/f
+[ "$FLAG_IP"x == "CN"x ] && DOWN_ADDR=http://mirrors.ustc.edu.cn/mariadb || DOWN_ADDR=https://downloads.mariadb.org/f
 [ -d "/lib64" ] && { SYS_BIT_a=x86_64;SYS_BIT_b=x86_64; } || { SYS_BIT_a=x86;SYS_BIT_b=i686; }
 LIBC_VERSION=`getconf -a | grep GNU_LIBC_VERSION | awk '{print $NF}'`
 LIBC_YN=`echo "$LIBC_VERSION < 2.14" | bc`

+ 5 - 9
functions/upgrade_php.sh

@@ -13,17 +13,13 @@ do
         echo
         read -p "Please input upgrade PHP Version: " php_version
         if [ "${php_version%.*}" == "${Old_php_version%.*}" ]; then
-                if [ "${php_version##*.}" -ge "${Old_php_version##*.}" ]; then
-                        [ ! -e "php-$php_version.tar.gz" ] && wget -c http://www.php.net/distributions/php-$php_version.tar.gz > /dev/null 2>&1
-                        if [ -e "php-$php_version.tar.gz" ];then
-                                echo -e "Download \033[32mphp-$php_version.tar.gz\033[0m successfully! "
-                        else
-				echo -e "\033[31mIt does not exist!\033[0m"
-                        fi
-			break
+                [ ! -e "php-$php_version.tar.gz" ] && wget -c http://www.php.net/distributions/php-$php_version.tar.gz > /dev/null 2>&1
+                if [ -e "php-$php_version.tar.gz" ];then
+                        echo -e "Download \033[32mphp-$php_version.tar.gz\033[0m successfully! "
                 else
-                        echo -e "Error: You must input PHP version not less than \033[32m$Old_php_version\033[0m!! "
+			echo -e "\033[31mIt does not exist!\033[0m"
                 fi
+		break
         else
                 echo -e "\033[31minput error!\033[0m Please only input '\033[32m${Old_php_version%.*}.xx' \033[0m"
         fi