fix bug
This commit is contained in:
17
lemp.sh
17
lemp.sh
@@ -5,6 +5,18 @@
|
||||
SCRIPT_ROOT=`pwd`
|
||||
cd $SCRIPT_ROOT
|
||||
|
||||
# Checking
|
||||
echo "Checking..."
|
||||
if [ -n "`grep 'Aliyun Linux release' /etc/issue`" -o -e /etc/redhat-release ];then
|
||||
OS=CentOS
|
||||
[ -n "`grep ' 7\.' /etc/redhat-release`" ] && CentOS_RHEL_version=7
|
||||
fi
|
||||
|
||||
if [ $OS != 'CentOS' ] || [ $CentOS_RHEL_version != '7' ];then
|
||||
echo "${CFAILURE}Error: This script only support CentOS 7${CEND}";
|
||||
kill -9 $$
|
||||
fi
|
||||
|
||||
while :; do echo
|
||||
read -p "Do you want to init your CentOS? [y/n]:(Default y press Enter) " init_yn
|
||||
[ -z "$init_yn" ] && init_yn=y
|
||||
@@ -46,11 +58,12 @@ while :; do echo
|
||||
read -p "Please type MariaDB root password:(Default lemp.sh press Enter) " MariaDB_ROOT_PWD
|
||||
[ -z "$MariaDB_ROOT_PWD" ] && MariaDB_ROOT_PWD="lemp.sh"
|
||||
[ -n "`echo $MariaDB_ROOT_PWD | grep '[+|&]'`" ] && { echo "${CWARNING}input error,not contain a plus sign (+) and & ${CEND}"; continue; }
|
||||
break;
|
||||
break
|
||||
done
|
||||
else
|
||||
break
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -61,7 +74,7 @@ fi
|
||||
# Install base packages
|
||||
echo "Installing base packages..."
|
||||
sudo yum -y update
|
||||
sudo yum -y install vim wget epel-release unzip git
|
||||
sudo yum -y install sudo vim wget epel-release unzip git
|
||||
|
||||
if [ "$nginx_yn" == 'y' ]; then
|
||||
. ./utils/nginx.sh
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Checking
|
||||
echo "Checking..."
|
||||
if [ -n "`grep 'Aliyun Linux release' /etc/issue`" -o -e /etc/redhat-release ];then
|
||||
OS=CentOS
|
||||
[ -n "`grep ' 7\.' /etc/redhat-release`" ] && CentOS_RHEL_version=7
|
||||
fi
|
||||
|
||||
if [ $OS != 'CentOS' ] || [ $CentOS_RHEL_version != '7' ];then
|
||||
echo "${CFAILURE}Error: This script only support CentOS 7${CEND}";
|
||||
kill -9 $$
|
||||
fi
|
||||
|
||||
# Close SELINUX
|
||||
setenforce 0
|
||||
|
||||
Reference in New Issue
Block a user