Browse Source

Fix echo and read -p issue and remove extra spaces from echo statements

old-stable
Mitesh Shah 12 years ago
parent
commit
7b5317b051
  1. 2
      install.sh
  2. 17
      usr/local/sbin/easyengine

2
install.sh

@ -54,7 +54,7 @@ fi
echo &>> $INSTALLLOG
echo &>> $INSTALLLOG
echo -e "\033[34mEasyEngine (ee) Installation Started `date +"%d-%b-%Y %H:%M:%S"`\e[0m" | tee -ai $INSTALLLOG
echo -e "\033[34mEasyEngine (ee) Installation Started [$(date)]\e[0m" | tee -ai $INSTALLLOG
# Checking Ed

17
usr/local/sbin/easyengine

@ -24,7 +24,7 @@ EasyEngine()
# Add TimeStamps In Install Log File
echo &>> $INSTALLLOG
echo &>> $INSTALLLOG
echo -e "\033[34mEasyEngine (ee) Execution Started At [$(date)] \e[0m" &>> $INSTALLLOG
echo -e "\033[34mEasyEngine (ee) Execution Started [$(date)]\e[0m" &>> $INSTALLLOG
echo -e "\033[34mEasyEngine (ee) Command: $0 $@\e[0m" &>> $INSTALLLOG
@ -221,7 +221,7 @@ WP-CLI()
# Install WP-CLI
if [ ! -d /usr/share/easyengine/wp-cli ]
then
echo -e "\033[31mWP-CLI Command Not Found ! \e[0m"
echo -e "\033[31mWP-CLI Command Not Found\e[0m"
echo -e "\033[34mInstalling WP-CLI, Please Wait...\e[0m"
curl -s http://wp-cli.org/installer.sh | INSTALL_DIR='/usr/share/easyengine/wp-cli' bash &>> $INSTALLLOG \
|| OwnError "Unable To Install WP-CLI"
@ -535,6 +535,7 @@ MYSQLINFO()
while [ $(echo $WPDBPREFIX | grep '[^[:alnum:] _]') ]
do
echo -e "\033[31mWarning: \033[34mTable Prefix Can Only Contain Numbers, Letters, And Underscores.\e[0m"
stty echo
read -p "Enter The MySQL Database Table Prefix [wp_]: " WPDBPREFIX
done
@ -741,7 +742,7 @@ EEWPDBSETUP()
{
# Get WordPress Site Title
echo -e "\033[34mWordPress Information Required...\e[0m"
stty echo
read -p "Site Title [$DOMAIN]: " SITETITLE
# If Enter Is Pressed, Then Use admin As WordPress Admin Username
@ -774,13 +775,16 @@ EEWPDBSETUP()
stty echo
done
echo
stty echo
read -p "Email: " WPADMINEMAIL
# Cross Check Blank WordPress Admin Email Address
while [ -z $WPADMINEMAIL ]
do
echo -e "\033[31mWarning: \033[34mWordPress Admin Email Should Not Blank\e[0m"
stty echo
read -p "Email: " WPADMINEMAIL
done
@ -923,7 +927,8 @@ REMOVEDB()
echo -e " WPDBNAME = $WPDBNAME \n MYSQLUSER = $MYSQLUSER"
# Remove Database
echo
stty echo
#echo
read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER
if [ "$ANSWER" = "y" ]
@ -940,7 +945,7 @@ REMOVEDB()
REMOVEFILES()
{
# Remove Webroot
echo
stty echo
read -p "Are You Sure To Remove $DOMAIN Webroot (y/n): " ANSWER
if [ "$ANSWER" = "y" ]
@ -956,7 +961,7 @@ REMOVEFILES()
REMOVENGINXCONF()
{
# Remove Nginx Configuraion
echo
stty echo
read -p "Are You Sure To Remove $DOMAIN Nginx Configuraion (y/n): " ANSWER
if [ "$ANSWER" = "y" ]

Loading…
Cancel
Save