From 451299456668b939a0a726aeb79022d6a3d303b4 Mon Sep 17 00:00:00 2001 From: xiaosong Date: Wed, 6 Sep 2017 17:49:23 +0800 Subject: [PATCH] fix bug --- utils/bbr.sh | 6 ++---- utils/init.sh | 4 ++-- utils/mariadb.sh | 6 +++--- utils/nginx.sh | 6 +++--- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/utils/bbr.sh b/utils/bbr.sh index 0622553..19bd6ea 100644 --- a/utils/bbr.sh +++ b/utils/bbr.sh @@ -2,7 +2,7 @@ # Install script for BBR base on CentOS 7 by xiaosong CentOS_Version=`cat /etc/redhat-release | grep -oE '[0-9]+\.[0-9]+' | cut -d'.' -f1` -KVersion=4.12.9-1 +KVersion=4.13.0-1 if [ -z ${CentOS_Version} ] then @@ -78,6 +78,4 @@ echo " " echo "Installation is completed, now you can reboot the system. " echo "You should check BBR after the rebooting using command: " echo " " -echo " sysctl -a|grep congestion_control" - - +echo " sysctl -a|grep congestion_control" \ No newline at end of file diff --git a/utils/init.sh b/utils/init.sh index 7de290d..a9c68fc 100644 --- a/utils/init.sh +++ b/utils/init.sh @@ -7,7 +7,7 @@ if [ -n "`grep 'Aliyun Linux release' /etc/issue`" -o -e /etc/redhat-release ];t [ -n "`grep ' 7\.' /etc/redhat-release`" ] && CentOS_RHEL_version=7 fi -if [ "$OS" != 'CentOS' ] || [ "$CentOS_RHEL_version" != '7' ];then +if [ $OS != 'CentOS' ] || [ $CentOS_RHEL_version != '7' ];then echo "${CFAILURE}Error: This script only support CentOS 7${CEND}"; kill -9 $$ fi @@ -71,4 +71,4 @@ sudo /sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT sudo /sbin/service iptables save sudo systemctl restart iptables -sudo systemctl enable iptables.service +sudo systemctl enable iptables.service \ No newline at end of file diff --git a/utils/mariadb.sh b/utils/mariadb.sh index 5e289c9..a0a8960 100644 --- a/utils/mariadb.sh +++ b/utils/mariadb.sh @@ -6,8 +6,8 @@ sudo yum install -y mariadb-server # Configure MariaDB echo "Configuring MariaDB..." -sudo cp `${SCRIPT_ROOT}/conf/my.cnf` /etc/my.cnf -sudo cp `${SCRIPT_ROOT}/conf/server.cnf` /etc/my.cnf.d/server.cnf +sudo cp ${SCRIPT_ROOT}/conf/my.cnf /etc/my.cnf +sudo cp ${SCRIPT_ROOT}/conf/server.cnf /etc/my.cnf.d/server.cnf echo "Install and start service..." sudo systemctl restart php-fpm.service @@ -24,4 +24,4 @@ y y y y -EOF +EOF \ No newline at end of file diff --git a/utils/nginx.sh b/utils/nginx.sh index 805b1cd..e908b7e 100644 --- a/utils/nginx.sh +++ b/utils/nginx.sh @@ -16,8 +16,8 @@ echo "Configuring Nginx for PHP..." IP=`curl -4 ip.llm.me` sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak sudo cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak -sudo cp `${SCRIPT_ROOT}/conf/nginx.conf` /etc/nginx/nginx.conf -sudo cp `${SCRIPT_ROOT}/conf/default.conf` /etc/nginx/conf.d/default.conf +sudo cp ${SCRIPT_ROOT}/conf/nginx.conf /etc/nginx/nginx.conf +sudo cp ${SCRIPT_ROOT}/conf/default.conf /etc/nginx/conf.d/default.conf sudo sed -i "s/localhost/$IP `hostname`/g" /etc/nginx/conf.d/default.conf echo "Configuring Firewall..." @@ -28,4 +28,4 @@ sudo systemctl restart iptables echo "Install and start service..." sudo systemctl restart nginx.service -sudo systemctl enable nginx.service +sudo systemctl enable nginx.service \ No newline at end of file