From b36ee27735a6ab4a278ccff4c3eb46528ead143c Mon Sep 17 00:00:00 2001 From: edwinvandeven Date: Wed, 14 May 2014 13:08:28 +0900 Subject: [PATCH 1/7] Allow deleting site without prompt ee site delete example.com --all-no-prompt Removes db, files and nginx config without asking user. Useful to remove interactivity when calling from a remote server. --- usr/local/sbin/easyengine | 47 +++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index 63636b18..c1d407db 100644 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -1533,7 +1533,14 @@ REMOVEDB() # Remove Database # For Proper read Command Output stty echo - read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER + if [ "$1" = "no-prompt" ] + then + # Assume yes + ANSWER="y" + else + # Ask user for confirmation + read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER + fi if [ "$ANSWER" = "y" ] then @@ -1564,7 +1571,14 @@ REMOVEFILES() # Remove Webroot # For Proper read Command Output stty echo - read -p "Are You Sure To Remove $DOMAIN Webroot (y/n): " ANSWER + if [ "$1" = "no-prompt" ] + then + # Assume yes + ANSWER="y" + else + # Ask user for confirmation + read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER + fi if [ "$ANSWER" = "y" ] then @@ -1581,8 +1595,14 @@ REMOVENGINXCONF() # Remove Nginx Configuration # For Proper read Command Output stty echo - read -p "Are You Sure To Remove $DOMAIN Nginx Configuration (y/n): " ANSWER - + if [ "$1" = "no-prompt" ] + then + # Assume yes + ANSWER="y" + else + # Ask user for confirmation + read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER + fi if [ "$ANSWER" = "y" ] then # Remove Webroot @@ -3001,6 +3021,25 @@ then EEGITCOMMIT fi + elif [ "$SITEDELETEARG" = "--all-no-prompt" ] + then + + # Remove All Database And Webroot + REMOVEDB "no-prompt" + REMOVEFILES "no-prompt" + + # Remove Nginx Configuration + REMOVENGINXCONF "no-prompt" + + # Reload Nginx + NGINXRELOAD + + # Take Nginx Configuration In Git Version Control + EEGITDIR=/etc/nginx + EEGITMESSAGE="Delete Website With $SITEDELETEARG Option: $DOMAIN" + EEGITCOMMIT + fi + elif [ "$2" = "edit" ] then From fe7d241db770b13f56aa04f378e867d825578524 Mon Sep 17 00:00:00 2001 From: Edwin van de Ven Date: Wed, 14 May 2014 15:48:20 +0900 Subject: [PATCH 2/7] Fixed extra fi There was one fi too much --- usr/local/sbin/easyengine | 1 - 1 file changed, 1 deletion(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index c1d407db..a0c31fd1 100644 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -3019,7 +3019,6 @@ then EEGITDIR=/etc/nginx EEGITMESSAGE="Delete Website With $SITEDELETEARG Option: $DOMAIN" EEGITCOMMIT - fi elif [ "$SITEDELETEARG" = "--all-no-prompt" ] then From f6c4a13345688eccb154b1286b1785a37abc558c Mon Sep 17 00:00:00 2001 From: Edwin van de Ven Date: Wed, 14 May 2014 18:10:22 +0900 Subject: [PATCH 3/7] Fixed wrong messages REMOVEFILES() AND REMOVENGINX() had the REMOVEDB() confirmation message --- usr/local/sbin/easyengine | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index a0c31fd1..26f77b3c 100644 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -1577,7 +1577,7 @@ REMOVEFILES() ANSWER="y" else # Ask user for confirmation - read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER + read -p "Are You Sure To Remove $DOMAIN Webroot (y/n): " ANSWER fi if [ "$ANSWER" = "y" ] @@ -1601,7 +1601,7 @@ REMOVENGINXCONF() ANSWER="y" else # Ask user for confirmation - read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER + read -p "Are You Sure To Remove $DOMAIN Nginx Configuration (y/n): " ANSWER fi if [ "$ANSWER" = "y" ] then From 198ec1b54dc5403098036ea38b0cc870fa8fb2d6 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 26 May 2014 14:18:08 +0530 Subject: [PATCH 4/7] Fixed Issue #251 --- usr/local/sbin/easyengine | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index 26f77b3c..c586654a 100644 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -530,21 +530,14 @@ INSTALLPMA() then if [ ! -d /var/www/22222/htdocs/db/pma ] then - echo -e "\033[34mDownloading phpMyAdmin, Please Wait...\e[0m" + echo -e "\033[34mCloning phpMyAdmin, Please Wait...\e[0m" # Setup PMA/phpMyAdmin mkdir -p /var/www/22222/htdocs/db/pma/ || OwnError "Unable To Create phpMyAdmin Directory: /var/www/22222/htdocs/db/pma/" - # Download PMA/phpMyAdmin - wget --no-check-certificate -cqO /var/www/22222/htdocs/db/pma/pma.tar.gz http://dl.cihar.com/phpMyAdmin/master/phpMyAdmin-master-latest.tar.gz \ - || OwnError "Unable To Download phpMyAdmin" - - # Extract PMA/phpMyAdmin - tar --strip-components=1 -zxf /var/www/22222/htdocs/db/pma/pma.tar.gz -C /var/www/22222/htdocs/db/pma/ \ - || OwnError "Unable To Extract phpMyAdmin" - - # Remove Unwanted Files - rm -f /var/www/22222/htdocs/db/pma/pma.tar.gz + # Clone PMA/phpMyAdmin Stable Branch + git clone -b STABLE https://github.com/phpmyadmin/phpmyadmin.git /var/www/22222/htdocs/db/pma/ &>> $INSTALLLOG \ + || OwnError "Unable To Clone phpMyAdmin" fi From 060c8cf83b5e52aa0143d1d2bcb054ea9373a7ee Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 26 May 2014 14:24:26 +0530 Subject: [PATCH 5/7] Fixed Travis-ci Branch issue --- .travis.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5340dace..568f7da3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,21 @@ language: bash + + before_install: before_script: -- sudo apt-get purge mysql* +- sudo apt-get purge mysql* graphviz* +- sudo apt-get autoremove script: # Specify Git Username/Password So Installation Script Don't Prompt For Input - sudo echo -e "[user]\n\tname = Mitesh Shah\n\temail = root@localhost" > ~/.gitconfig -- sudo bash install.sh +- sudo echo "Travis Banch = $TRAVIS_BRANCH" +- sudo sed -i "s/stable/$TRAVIS_BRANCH/g" install.sh +- sudo bash -x install.sh - sudo sed -i "s/htpasswduser.*/htpasswduser = easyengine/" /etc/easyengine/ee.conf - sudo sed -i "s/htpasswdpass.*/htpasswdpass = easyengine/" /etc/easyengine/ee.conf @@ -35,4 +40,4 @@ script: - sudo ee info - sudo ee system status - sudo ee system restart -- sudo mysql -e "show databases"; +- sudo mysql -e "show databases"; \ No newline at end of file From 306b7cfc7c7d8e90babda5913d50e6994a78de58 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 26 May 2014 14:45:25 +0530 Subject: [PATCH 6/7] Change phpMyAdmin Download Fixed Issue #251 --- usr/local/sbin/easyengine | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index c586654a..08e06aef 100644 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -530,14 +530,21 @@ INSTALLPMA() then if [ ! -d /var/www/22222/htdocs/db/pma ] then - echo -e "\033[34mCloning phpMyAdmin, Please Wait...\e[0m" + echo -e "\033[34mDownloading phpMyAdmin, Please Wait...\e[0m" # Setup PMA/phpMyAdmin mkdir -p /var/www/22222/htdocs/db/pma/ || OwnError "Unable To Create phpMyAdmin Directory: /var/www/22222/htdocs/db/pma/" - # Clone PMA/phpMyAdmin Stable Branch - git clone -b STABLE https://github.com/phpmyadmin/phpmyadmin.git /var/www/22222/htdocs/db/pma/ &>> $INSTALLLOG \ - || OwnError "Unable To Clone phpMyAdmin" + # Download PMA/phpMyAdmin + wget --no-check-certificate -cqO /var/www/22222/htdocs/db/pma/pma.tar.gz https://github.com/phpmyadmin/phpmyadmin/archive/STABLE.tar.gz \ + || OwnError "Unable To Download phpMyAdmin" + + # Extract PMA/phpMyAdmin + tar --strip-components=1 -zxf /var/www/22222/htdocs/db/pma/pma.tar.gz -C /var/www/22222/htdocs/db/pma/ \ + || OwnError "Unable To Extract phpMyAdmin" + + # Remove Unwanted Files + rm -f /var/www/22222/htdocs/db/pma/pma.tar.gz fi From 12810f9a73d5d7077f32ca61cf96be2523d83424 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 26 May 2014 15:15:08 +0530 Subject: [PATCH 7/7] EasyEngine v1.3.8 --- CHANGELOG.txt | 6 ++++++ usr/local/sbin/easyengine | 2 +- usr/local/sbin/eeupdate | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d1da726f..d0233fb2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,9 @@ +v 1.3.8 - May 26, 2014 + - Fixed phpMyAdmin download issue #251 + - Fixed swap issue #223 by @Swingline0 + - Delete website without prompt by @edwinvandeven #239 + + v 1.3.7 - Apr 29, 2014 - Fixed EasyEngine Update Problem - Fixed Issue #206 diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index 08e06aef..86b43f09 100644 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -1990,7 +1990,7 @@ if [ "$1" = "version" ] || [ "$1" = "--version" ] || [ "$1" = "-v" ] then # Display Easy Engine Version - echo "easyengine version: 1.3.7" + echo "easyengine version: 1.3.8" # Easy Engine Info elif [ "$1" = "info" ] diff --git a/usr/local/sbin/eeupdate b/usr/local/sbin/eeupdate index 80c6ace7..6f069222 100644 --- a/usr/local/sbin/eeupdate +++ b/usr/local/sbin/eeupdate @@ -625,7 +625,7 @@ then EECURRENTVERSION="1.3.4" fi - if [[ $EECURRENTVERSION = 1.3.4 ]] || [[ $EECURRENTVERSION = 1.3.5 ]] || [[ $EECURRENTVERSION = 1.3.6 ]] + if [[ $EECURRENTVERSION = 1.3.4 ]] || [[ $EECURRENTVERSION = 1.3.5 ]] || [[ $EECURRENTVERSION = 1.3.6 ]] || [[ $EECURRENTVERSION = 1.3.7 ]] then EE134 fi