Browse Source

remove unneeded spaces

lj2007331 8 years ago
parent
commit
f0e808176d

+ 5 - 5
apps.conf

@@ -1,8 +1,8 @@
 # newest software version
 # Web
-nginx_version=1.10.0
+nginx_version=1.10.1
 tengine_version=2.1.1
-openresty_version=1.9.7.4
+openresty_version=1.9.7.5
 
 tomcat_7_version=7.0.69
 tomcat_8_version=8.0.30
@@ -41,9 +41,9 @@ php_7_version=7.0.7
 zendopcache_version=7.0.5
 xcache_version=3.2.0
 apcu_version=4.0.10
-ImageMagick_version=6.9.4-4
+ImageMagick_version=6.9.4-5
 imagick_version=3.4.1
-GraphicsMagick_version=1.3.23
+GraphicsMagick_version=1.3.24
 gmagick_version=1.1.7RC3
 libiconv_version=1.14
 libmcrypt_version=2.5.8
@@ -64,7 +64,7 @@ memcached_pecl_version=2.2.0
 memcache_pecl_version=3.0.8
 
 # phpMyadmin
-phpMyAdmin_version=4.4.15.5
+phpMyAdmin_version=4.4.15.6
 
 # jemalloc
 jemalloc_version=4.2.0

+ 8 - 23
backup_setup.sh

@@ -25,9 +25,7 @@ printf "
 # Check if user is root
 [ $(id -u) != "0" ] && { echo "${CFAILURE}Error: You must be root to run this script${CEND}"; exit 1; }
 
-while :
-do
-    echo
+while :; do echo
     echo 'Please select your backup destination:'
     echo -e "\t${CMSG}1${CEND}. Only Localhost"
     echo -e "\t${CMSG}2${CEND}. Only Remote host"
@@ -45,9 +43,7 @@ done
 [ "$DESC_BK" == '2' ] && sed -i 's@^backup_destination=.*@backup_destination=remote@' ./options.conf
 [ "$DESC_BK" == '3' ] && sed -i 's@^backup_destination=.*@backup_destination=local,remote@' ./options.conf
 
-while :
-do
-    echo
+while :; do echo
     echo 'Please select your backup content:'
     echo -e "\t${CMSG}1${CEND}. Only Database"
     echo -e "\t${CMSG}2${CEND}. Only Website"
@@ -65,9 +61,7 @@ done
 [ "$CONTENT_BK" == '2' ] && sed -i 's@^backup_content=.*@backup_content=web@' ./options.conf
 [ "$CONTENT_BK" == '3' ] && sed -i 's@^backup_content=.*@backup_content=db,web@' ./options.conf
 
-while :
-do
-    echo
+while :; do echo
     echo "Please enter the directory for save the backup file: "
     read -p "(Default directory: $backup_dir): " NEW_backup_dir
     [ -z "$NEW_backup_dir" ] && NEW_backup_dir="$backup_dir"
@@ -79,9 +73,7 @@ do
 done
 sed -i "s@^backup_dir=.*@backup_dir=$NEW_backup_dir@" ./options.conf
 
-while :
-do
-    echo
+while :; do echo
     echo "Pleas enter a valid backup number of days: "
     read -p "(Default days: 5): " expired_days
     [ -z "$expired_days" ] && expired_days=5
@@ -91,9 +83,7 @@ sed -i "s@^expired_days=.*@expired_days=$expired_days@" ./options.conf
 
 if [ "$CONTENT_BK" != '2' ];then
     databases=`$db_install_dir/bin/mysql -uroot -p$dbrootpwd -e "show databases\G" | grep Database | awk '{print $2}' | grep -Evw "(performance_schema|information_schema|mysql|sys)"`
-    while :
-    do
-        echo
+    while :; do echo
         echo "Please enter one or more name for database, separate multiple database names with commas: "
         read -p "(Default database: `echo $databases | tr ' ' ','`) " db_name
         db_name=`echo $db_name | tr -d ' '`
@@ -110,9 +100,7 @@ fi
 
 if [ "$CONTENT_BK" != '1' ];then
     websites=`ls $wwwroot_dir | grep -vw default`
-    while :
-    do
-        echo
+    while :; do echo
         echo "Please enter one or more name for website, separate multiple website names with commas: "
         read -p "(Default website: `echo $websites | tr ' ' ','`) " website_name
         website_name=`echo $website_name | tr -d ' '`
@@ -134,9 +122,7 @@ echo "You have to backup the content:"
 
 if [[ "$DESC_BK" =~ ^[2,3]$ ]];then
     > tools/iplist.txt
-    while :
-    do
-        echo
+    while :; do echo
         read -p "Please enter the remote host ip: " remote_ip
         [ -z "$remote_ip" -o "$remote_ip" == '127.0.0.1' ] && continue
         echo
@@ -154,8 +140,7 @@ if [[ "$DESC_BK" =~ ^[2,3]$ ]];then
         ./tools/mssh.exp ${IPcode}P $remote_user ${PWcode}P ${Portcode}P true 10
         if [ $? -eq 0 ];then
             [ -z "`grep $remote_ip tools/iplist.txt`" ] && echo "$remote_ip $remote_port $remote_user $remote_password" >> tools/iplist.txt || echo "${CWARNING}$remote_ip has been added! ${CEND}"
-            while :
-            do
+            while :; do
                 read -p "Do you want to add more host ? [y/n]: " more_host_yn
                 if [[ ! "$more_host_yn" =~ ^[y,n]$ ]];then
                     echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"

+ 2 - 5
include/upgrade_db.sh

@@ -30,8 +30,7 @@ else
 fi
 
 #backup
-while :
-do
+while :; do
     $db_install_dir/bin/mysql -uroot -p${dbrootpwd} -e "quit" >/dev/null 2>&1
     if [ $? -eq 0 ];then
         break
@@ -61,9 +60,7 @@ echo "Current $DB Version: ${CMSG}$OLD_DB_version${CEND}"
 [ -e /usr/local/lib/libtcmalloc.so ] && { je_tc_malloc=2; EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"; }
 [ -e /usr/local/lib/libjemalloc.so -a -e /usr/local/lib/libtcmalloc.so ] && { je_tc_malloc=1; EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"; }
 
-while :
-do
-    echo
+while :; do echo
     read -p "Please input upgrade $DB Version(example: $OLD_DB_version): " NEW_DB_version
     if [ `echo $NEW_DB_version | awk -F. '{print $1"."$2}'` == `echo $OLD_DB_version | awk -F. '{print $1"."$2}'` ]; then
         if [ "$DB" == 'MariaDB' ];then

+ 1 - 3
include/upgrade_php.sh

@@ -14,9 +14,7 @@ cd $oneinstack_dir/src
 echo
 OLD_PHP_version=`$php_install_dir/bin/php -r 'echo PHP_VERSION;'`
 echo "Current PHP Version: ${CMSG}$OLD_PHP_version${CEND}"
-while :
-do
-    echo
+while :; do echo
     read -p "Please input upgrade PHP Version: " NEW_PHP_version
     if [ "${NEW_PHP_version%.*}" == "${OLD_PHP_version%.*}" ]; then
         [ ! -e "php-$NEW_PHP_version.tar.gz" ] && wget --no-check-certificate -c http://www.php.net/distributions/php-$NEW_PHP_version.tar.gz > /dev/null 2>&1

+ 1 - 3
include/upgrade_phpmyadmin.sh

@@ -14,9 +14,7 @@ cd $oneinstack_dir/src
 OLD_phpMyAdmin_version=`grep Version $wwwroot_dir/default/phpMyAdmin/README | awk '{print $2}'`
 echo "Current phpMyAdmin Version: ${CMSG}$OLD_phpMyAdmin_version${CEND}"
 
-while :
-do
-    echo
+while :; do echo
     read -p "Please input upgrade phpMyAdmin Version(example: 4.4.15): " NEW_phpMyAdmin_version
     if [ "$NEW_phpMyAdmin_version" != "$OLD_phpMyAdmin_version" ];then
         [ ! -e "phpMyAdmin-${NEW_phpMyAdmin_version}-all-languages.tar.gz" ] && wget --no-check-certificate -c https://files.phpmyadmin.net/phpMyAdmin/$NEW_phpMyAdmin_version/phpMyAdmin-${NEW_phpMyAdmin_version}-all-languages.tar.gz > /dev/null 2>&1

+ 1 - 3
include/upgrade_redis.sh

@@ -13,9 +13,7 @@ cd $oneinstack_dir/src
 [ ! -d "$redis_install_dir" ] && echo "${CWARNING}The Redis is not installed on your system! ${CEND}" && exit 1
 OLD_Redis_version=`$redis_install_dir/bin/redis-cli --version | awk '{print $2}'`
 echo "Current Redis Version: ${CMSG}$OLD_Redis_version${CEND}"
-while :
-do
-    echo
+while :; do echo
     read -p "Please input upgrade Redis Version(example: 3.0.5): " NEW_Redis_version
     if [ "$NEW_Redis_version" != "$OLD_Redis_version" ];then
         [ ! -e "redis-$NEW_Redis_version.tar.gz" ] && wget --no-check-certificate -c http://download.redis.io/releases/redis-$NEW_Redis_version.tar.gz > /dev/null 2>&1

+ 3 - 9
include/upgrade_web.sh

@@ -15,9 +15,7 @@ OLD_Nginx_version_tmp=`$nginx_install_dir/sbin/nginx -v 2>&1`
 OLD_Nginx_version=${OLD_Nginx_version_tmp##*/}
 echo
 echo "Current Nginx Version: ${CMSG}$OLD_Nginx_version${CEND}"
-while :
-do
-    echo
+while :; do echo
     read -p "Please input upgrade Nginx Version(example: 1.9.15): " NEW_Nginx_version
     if [ "$NEW_Nginx_version" != "$OLD_Nginx_version" ];then
         [ ! -e "nginx-$NEW_Nginx_version.tar.gz" ] && wget --no-check-certificate -c http://nginx.org/download/nginx-$NEW_Nginx_version.tar.gz > /dev/null 2>&1
@@ -69,9 +67,7 @@ OLD_Tengine_version_tmp=`$tengine_install_dir/sbin/nginx -v 2>&1`
 OLD_Tengine_version="`echo ${OLD_Tengine_version_tmp#*/} | awk '{print $1}'`"
 echo
 echo "Current Tengine Version: ${CMSG}$OLD_Tengine_version${CEND}"
-while :
-do
-    echo
+while :; do echo
     read -p "Please input upgrade Tengine Version(example: 2.1.15): " NEW_Tengine_version
     if [ "$NEW_Tengine_version" != "$OLD_Tengine_version" ];then
         [ ! -e "tengine-$NEW_Tengine_version.tar.gz" ] && wget --no-check-certificate -c http://tengine.taobao.org/download/tengine-$NEW_Tengine_version.tar.gz > /dev/null 2>&1
@@ -128,9 +124,7 @@ OLD_OpenResty_version_tmp=`$openresty_install_dir/nginx/sbin/nginx -v 2>&1`
 OLD_OpenResty_version="`echo ${OLD_OpenResty_version_tmp#*/} | awk '{print $1}'`"
 echo
 echo "Current OpenResty Version: ${CMSG}$OLD_OpenResty_version${CEND}"
-while :
-do
-    echo
+while :; do echo
     read -p "Please input upgrade OpenResty Version(example: 1.9.7.19): " NEW_OpenResty_version
     if [ "$NEW_OpenResty_version" != "$OLD_OpenResty_version" ];then
         [ ! -e "openresty-$NEW_OpenResty_version.tar.gz" ] && wget --no-check-certificate -c https://openresty.org/download/openresty-$NEW_OpenResty_version.tar.gz > /dev/null 2>&1

+ 4 - 18
pureftpd_vhost.sh

@@ -34,9 +34,7 @@ FTP_bin=$pureftpd_install_dir/bin/pure-pw
 [ -z "`grep ^PureDB $FTP_conf`" ] && { echo "${CFAILURE}pure-ftpd is not own password database${CEND}" ; exit 1; }
 
 USER() {
-while :
-do
-    echo
+while :; do echo
     read -p "Please input a username: " User
     if [ -z "$User" ]; then
         echo "${CWARNING}username can't be NULL! ${CEND}"
@@ -47,9 +45,7 @@ done
 }
 
 PASSWORD() {
-while :
-do
-    echo
+while :; do echo
     read -p "Please input the password: " Password
     [ -n "`echo $Password | grep '[+|&]'`" ] && { echo "${CWARNING}input error,not contain a plus sign (+) and &${CEND}"; continue; }
     if (( ${#Password} >= 5 ));then
@@ -62,9 +58,7 @@ done
 }
 
 DIRECTORY() {
-while :
-do
-echo
+while :; do echo
     read -p "Please input the directory(Default directory: $wwwroot_dir): " Directory
     if [ -z "$Directory" ]; then
         Directory="$wwwroot_dir"
@@ -77,8 +71,7 @@ echo
 done
 }
 
-while :
-do
+while :; do
     printf "
 What Are You Doing?
 \t${CMSG}1${CEND}. UserAdd
@@ -109,7 +102,6 @@ What Are You Doing?
             echo "You directory is : ${CMSG}$Directory${CEND}"
             echo
             ;;
-
         2)
             USER
             [ -e "$Passwdfile" ] && [ -z "`grep ^${User}: $Passwdfile`" ] && { echo "${CQUESTION}[$User] was not existed! ${CEND}"; continue; }
@@ -124,7 +116,6 @@ What Are You Doing?
             echo "You new directory is : ${CMSG}$Directory${CEND}"
             echo
             ;;
-
         3)
             USER
             [ -e "$Passwdfile" ] && [ -z "`grep ^${User}: $Passwdfile`" ] && { echo "${CQUESTION}[$User] was not existed! ${CEND}"; continue; }
@@ -139,7 +130,6 @@ What Are You Doing?
             echo "You new password is : ${CMSG}$Password${CEND}"
             echo
             ;;
-
         4)
             if [ ! -e "$Passwdfile" ];then
                 echo "${CQUESTION}User was not existed! ${CEND}"
@@ -154,7 +144,6 @@ What Are You Doing?
             echo
             echo "[$User] have been deleted! "
             ;;
-
         5)
             if [ ! -e "$Passwdfile" ];then
                 echo "${CQUESTION}User was not existed! ${CEND}"
@@ -162,17 +151,14 @@ What Are You Doing?
                 $FTP_bin list
             fi
             ;;
-
         6)
             USER
             [ -e "$Passwdfile" ] && [ -z "`grep ^${User}: $Passwdfile`" ] && { echo "${CQUESTION}[$User] was not existed! ${CEND}"; continue; }
             $FTP_bin show $User
             ;;
-
         q)
             exit
             ;;
-
         esac
     fi
 done

+ 1 - 3
reset_db_root_password.sh

@@ -28,9 +28,7 @@ printf "
 Reset_db_root_password()
 {
 [ ! -d "$db_install_dir" ] && { echo "${CFAILURE}The Database is not installed on your system! ${CEND}"; exit 1; }
-while :
-do
-    echo
+while :; do echo
     read -p "Please input the root password of database: " New_dbrootpwd
     [ -n "`echo $New_dbrootpwd | grep '[+|&]'`" ] && { echo "${CWARNING}input error,not contain a plus sign (+) and &${CEND}"; continue; }
     (( ${#New_dbrootpwd} >= 5 )) && break || echo "${CWARNING}database root password least 5 characters! ${CEND}"

+ 3 - 9
shadowsocks.sh

@@ -38,9 +38,7 @@ Check_shadowsocks() {
 }
 
 AddUser_shadowsocks() {
-while :
-do
-    echo
+while :; do echo
     read -p "Please input password for shadowsocks: " Shadowsocks_password
     [ -n "`echo $Shadowsocks_password | grep '[+|&]'`" ] && { echo "${CWARNING}input error,not contain a plus sign (+) and & ${CEND}"; continue; }
     (( ${#Shadowsocks_password} >= 5 )) && break || echo "${CWARNING}Shadowsocks password least 5 characters! ${CEND}"
@@ -60,9 +58,7 @@ else
     Shadowsocks_Default_port=9001
 fi
 
-while :
-do
-    echo
+while :; do echo
     read -p "Please input Shadowsocks port(Default: $Shadowsocks_Default_port): " Shadowsocks_port
     [ -z "$Shadowsocks_port" ] && Shadowsocks_port=$Shadowsocks_Default_port
     if [ $Shadowsocks_port -ge 9000 >/dev/null 2>&1 -a $Shadowsocks_port -le 10000 >/dev/null 2>&1 ];then
@@ -166,9 +162,7 @@ fi
 }
 
 Uninstall_shadowsocks(){
-while :
-do
-    echo
+while :; do echo
     read -p "Do you want to uninstall Shadowsocks? [y/n]: " Shadowsocks_yn
     if [[ ! $Shadowsocks_yn =~ ^[y,n]$ ]];then
         echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"

+ 1 - 2
tools/mabs.sh

@@ -59,8 +59,7 @@ TEMP=`getopt -o hvVl:c:t:T:L:n --long help,version,iplist:,config:,sshtimeout:,f
 
 eval set -- "$TEMP"
 
-while :
-do
+while :; do
     [ -z "$1" ] && break;
     case "$1" in
         -h|--help)

+ 1 - 2
uninstall.sh

@@ -170,8 +170,7 @@ echo "${CMSG}Memcached uninstall completed${CEND}"
 }
 
 Menu(){
-while :
-do
+while :; do
     printf "
 What Are You Doing?
 \t${CMSG}0${CEND}. Uninstall All

+ 1 - 2
upgrade.sh

@@ -53,8 +53,7 @@ ${CMSG}phpmyadmin${CEND}     --->Upgrade phpMyAdmin
 }
 
 Menu(){
-while :
-do
+while :; do
     printf "
 What Are You Doing?
 \t${CMSG}1${CEND}. Upgrade Nginx/Tengine/OpenResty

+ 20 - 60
vhost.sh

@@ -37,9 +37,7 @@ ${CMSG}del${CEND}    --->Delete Virtualhost
 Choose_env() {
 if [ -e "$php_install_dir/bin/phpize" -a -e "$tomcat_install_dir/conf/server.xml" -a -e "/usr/bin/hhvm" ];then
     Number=111
-    while :
-    do
-        echo
+    while :; do echo
         echo 'Please choose to use environment:'
         echo -e "\t${CMSG}1${CEND}. Use php"
         echo -e "\t${CMSG}2${CEND}. Use java"
@@ -57,9 +55,7 @@ if [ -e "$php_install_dir/bin/phpize" -a -e "$tomcat_install_dir/conf/server.xml
     [ "$Choose_number" == '3' ] && NGX_FLAG=hhvm
 elif [ -e "$php_install_dir/bin/phpize" -a -e "$tomcat_install_dir/conf/server.xml" -a ! -e "/usr/bin/hhvm" ];then
     Number=110
-    while :
-    do
-        echo
+    while :; do echo
         echo 'Please choose to use environment:'
         echo -e "\t${CMSG}1${CEND}. Use php"
         echo -e "\t${CMSG}2${CEND}. Use java"
@@ -78,9 +74,7 @@ elif [ -e "$php_install_dir/bin/phpize" -a ! -e "$tomcat_install_dir/conf/server
     NGX_FLAG=php
 elif [ -e "$php_install_dir/bin/phpize" -a ! -e "$tomcat_install_dir/conf/server.xml" -a -e "/usr/bin/hhvm" ];then
     Number=101
-    while :
-    do
-        echo
+    while :; do echo
         echo 'Please choose to use environment:'
         echo -e "\t${CMSG}1${CEND}. Use php"
         echo -e "\t${CMSG}2${CEND}. Use hhvm"
@@ -96,9 +90,7 @@ elif [ -e "$php_install_dir/bin/phpize" -a ! -e "$tomcat_install_dir/conf/server
     [ "$Choose_number" == '2' ] && NGX_FLAG=hhvm
 elif [ ! -e "$php_install_dir/bin/phpize" -a -e "$tomcat_install_dir/conf/server.xml" -a -e "/usr/bin/hhvm" ];then
     Number=011
-    while :
-    do
-        echo
+    while :; do echo
         echo 'Please choose to use environment:'
         echo -e "\t${CMSG}1${CEND}. Use java"
         echo -e "\t${CMSG}2${CEND}. Use hhvm"
@@ -184,9 +176,7 @@ echo "`printf "%-30s" "SSL CSR File:"`${CMSG}$web_install_dir/conf/ssl/${domain}
 
 Input_Add_domain() {
 if [ -e "$web_install_dir/sbin/nginx" ];then
-    while :
-    do
-        echo
+    while :; do echo
         read -p "Do you want to setup SSL under Nginx? [y/n]: " nginx_ssl_yn
         if [[ ! $nginx_ssl_yn =~ ^[y,n]$ ]];then
             echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -196,9 +186,7 @@ if [ -e "$web_install_dir/sbin/nginx" ];then
     done
 fi
 
-while :
-do
-    echo
+while :; do echo
     read -p "Please input domain(example: www.linuxeye.com): " domain
     if [ -z "`echo $domain | grep '.*\..*'`" ]; then
         echo "${CWARNING}input error! ${CEND}"
@@ -216,9 +204,7 @@ else
     echo "domain=$domain"
 fi
 
-while :
-do
-    echo
+while :; do echo
     read -p "Do you want to add more domain name? [y/n]: " moredomainame_yn
     if [[ ! $moredomainame_yn =~ ^[y,n]$ ]];then
         echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -228,9 +214,7 @@ do
 done
 
 if [ "$moredomainame_yn" == 'y' ]; then
-    while :
-    do
-        echo
+    while :; do echo
         read -p "Type domainname or IP(example: linuxeye.com 121.43.8.8): " moredomain
         if [ -z "`echo $moredomain | grep '.*\..*'`" ]; then
             echo "${CWARNING}input error! ${CEND}"
@@ -245,9 +229,7 @@ if [ "$moredomainame_yn" == 'y' ]; then
     Tomcat_Domain_alias=$(for D in `echo $moredomainame`; do echo "<Alias>$D</Alias>"; done)
 
     if [ -e "$web_install_dir/sbin/nginx" ];then
-        while :
-        do
-            echo
+        while :; do echo
             read -p "Do you want to redirect from $moredomain to $domain? [y/n]: " redirect_yn
             if [[ ! $redirect_yn =~ ^[y,n]$ ]];then
                 echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -272,9 +254,7 @@ else
     Nginx_conf='listen 80;'
 fi
 
-while :
-do
-    echo
+while :; do echo
     echo "Please input the directory for the domain:$domain :"
     read -p "(Default directory: $wwwroot_dir/$domain): " vhostdir
     if [ -n "$vhostdir" -a -z "`echo $vhostdir | grep '^/'`" ];then
@@ -295,9 +275,7 @@ done
 }
 
 Nginx_anti_hotlinking() {
-while :
-do
-    echo
+while :; do echo
     read -p "Do you want to add hotlink protection? [y/n]: " anti_hotlinking_yn
     if [[ ! $anti_hotlinking_yn =~ ^[y,n]$ ]];then
         echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -326,9 +304,7 @@ fi
 
 Nginx_rewrite() {
 [ ! -d "$web_install_dir/conf/rewrite" ] && mkdir $web_install_dir/conf/rewrite
-while :
-do
-    echo
+while :; do echo
     read -p "Allow Rewrite rule? [y/n]: " rewrite_yn
     if [[ ! $rewrite_yn =~ ^[y,n]$ ]];then
         echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -358,9 +334,7 @@ fi
 }
 
 Nginx_log() {
-while :
-do
-    echo
+while :; do echo
     read -p "Allow Nginx/Tengine/OpenResty access_log? [y/n]: " access_yn
     if [[ ! $access_yn =~ ^[y,n]$ ]];then
         echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -511,9 +485,7 @@ echo "`printf "%-30s" "Directory of:"`${CMSG}$vhostdir${CEND}"
 }
 
 Apache_log() {
-while :
-do
-    echo
+while :; do echo
     read -p "Allow Apache access_log? [y/n]: " access_yn
     if [[ ! $access_yn =~ ^[y,n]$ ]];then
         echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -716,9 +688,7 @@ Del_NGX_Vhost() {
             echo
             echo "Virtualhost list:"
         echo ${CMSG}$Domain_List${CEND}
-            while :
-            do
-                echo
+            while :; do echo
                 read -p "Please input a domain you want to delete: " domain
                 if [ -z "`echo $domain | grep '.*\..*'`" ]; then
                     echo "${CWARNING}input error! ${CEND}"
@@ -727,9 +697,7 @@ Del_NGX_Vhost() {
                         Directory=`grep ^root $web_install_dir/conf/vhost/${domain}.conf | awk -F'[ ;]' '{print $2}'`
                         rm -rf $web_install_dir/conf/vhost/${domain}.conf
                         $web_install_dir/sbin/nginx -s reload
-                        while :
-                        do
-                            echo
+                        while :; do echo
                             read -p "Do you want to delete Virtul Host directory? [y/n]: " Del_Vhost_wwwroot_yn
                             if [[ ! $Del_Vhost_wwwroot_yn =~ ^[y,n]$ ]];then
                                 echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -767,9 +735,7 @@ Del_Apache_Vhost() {
                 echo
                 echo "Virtualhost list:"
                 echo ${CMSG}$Domain_List${CEND}
-                while :
-                do
-                    echo
+                while :; do echo
                     read -p "Please input a domain you want to delete: " domain
                     if [ -z "`echo $domain | grep '.*\..*'`" ]; then
                         echo "${CWARNING}input error! ${CEND}"
@@ -778,9 +744,7 @@ Del_Apache_Vhost() {
                             Directory=`grep '^<Directory' $apache_install_dir/conf/vhost/${domain}.conf | awk -F'"' '{print $2}'`
                             rm -rf $apache_install_dir/conf/vhost/${domain}.conf
                             /etc/init.d/httpd restart
-                            while :
-                            do
-                                echo
+                            while :; do echo
                                 read -p "Do you want to delete Virtul Host directory? [y/n]: " Del_Vhost_wwwroot_yn
                                 if [[ ! $Del_Vhost_wwwroot_yn =~ ^[y,n]$ ]];then
                                     echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
@@ -823,9 +787,7 @@ Del_Tomcat_Vhost() {
                 echo
                 echo "Virtualhost list:"
                 echo ${CMSG}$Domain_List${CEND}
-                while :
-                do
-                    echo
+                while :; do echo
                     read -p "Please input a domain you want to delete: " domain
                     if [ -z "`echo $domain | grep '.*\..*'`" ]; then
                         echo "${CWARNING}input error! ${CEND}"
@@ -834,9 +796,7 @@ Del_Tomcat_Vhost() {
                             sed -i /vhost-${domain}/d $tomcat_install_dir/conf/server.xml
                             rm -rf $tomcat_install_dir/conf/vhost/${domain}.xml
                             /etc/init.d/tomcat restart
-                            while :
-                            do
-                                echo
+                            while :; do echo
                                 read -p "Do you want to delete Virtul Host directory? [y/n]: " Del_Vhost_wwwroot_yn
                                 if [[ ! $Del_Vhost_wwwroot_yn =~ ^[y,n]$ ]];then
                                     echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"