diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3b419817..91fda6ca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,7 @@ +v 3.1.7 - May 21, 2015 +- Fixed site blank issue after nginx stack upgrade on Debian +- Improved update script + v 3.1.6 - May 19, 2015 - Added Debian 8 support, see #524 - EasyEngine now uses dphys-swapfile for swap creation, see #359 diff --git a/README.md b/README.md index 0220e212..641f5eae 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ EasyEngine (ee) is a python tool, which makes it easy to manage your wordpress s **EasyEngine currently supports:** - Ubuntu 12.04 & 14.04 -- Debian 7 +- Debian 7 & 8 ## Quick Start diff --git a/ee/cli/plugins/stack_upgrade.py b/ee/cli/plugins/stack_upgrade.py index 4c9eac0a..3743a11f 100644 --- a/ee/cli/plugins/stack_upgrade.py +++ b/ee/cli/plugins/stack_upgrade.py @@ -165,7 +165,7 @@ class EEStackUpgradeController(CementBaseController): if EEAptGet.is_installed(self, 'mariadb-server'): apt_packages = apt_packages + EEVariables.ee_mysql else: - Log.info(self, "MySQL is not installed") + Log.info(self, "MariaDB is not installed") if self.app.pargs.postfix: if EEAptGet.is_installed(self, 'postfix'): @@ -188,6 +188,31 @@ class EEStackUpgradeController(CementBaseController): EEAptGet.install(self, apt_packages) Log.info(self, "Successfully updated packages") + # Post Actions after package updates + if set(EEVariables.ee_nginx).issubset(set(apt_packages)): + # Fix whitescreen of death beacuse of missing value + # fastcgi_param SCRIPT_FILENAME $request_filename; in file + # /etc/nginx/fastcgi_params + if not EEFileUtils.grep(self, '/etc/nginx/fastcgi_params', + 'SCRIPT_FILENAME'): + with open('/etc/nginx/fastcgi_params', + encoding='utf-8', mode='a') as ee_nginx: + ee_nginx.write('fastcgi_param \tSCRIPT_FILENAME ' + '\t$request_filename;\n') + + EEService.restart_service(self, 'nginx') + + if set(EEVariables.ee_php).issubset(set(apt_packages)): + EEService.restart_service(self, 'php') + if set(EEVariables.ee_hhvm).issubset(set(apt_packages)): + EEService.restart_service(self, 'hhvm') + if set(EEVariables.ee_postfix).issubset(set(apt_packages)): + EEService.restart_service(self, 'postfix') + if set(EEVariables.ee_mysql).issubset(set(apt_packages)): + EEService.restart_service(self, 'hhvm') + if set(EEVariables.ee_mail).issubset(set(apt_packages)): + EEService.restart_service(self, 'dovecot') + # PHP 5.6 to 5.6 elif (self.app.pargs.php56): self.upgrade_php56() diff --git a/ee/core/variables.py b/ee/core/variables.py index 28d622c2..54fd4154 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -12,7 +12,7 @@ class EEVariables(): """Intialization of core variables""" # EasyEngine version - ee_version = "3.1.6" + ee_version = "3.1.7" # EasyEngine packages versions ee_wp_cli = "0.19.1" diff --git a/install b/install index 6f454633..be6a81cb 100644 --- a/install +++ b/install @@ -48,7 +48,7 @@ fi # Define variables for later use ee_branch=$1 readonly ee_version_old="2.2.3" -readonly ee_version_new="3.1.6" +readonly ee_version_new="3.1.7" readonly ee_log_dir=/var/log/ee/ readonly ee_install_log=/var/log/ee/install.log readonly ee_linux_distro=$(lsb_release -i | awk '{print $3}') @@ -58,14 +58,14 @@ readonly ee_debian_version=$(lsb_release -sc) if [ "$ee_linux_distro" != "Ubuntu" ] && [ "$ee_linux_distro" != "Debian" ]; then ee_lib_echo_fail "EasyEngine (ee) is made for Ubuntu and Debian only as of now" ee_lib_echo_fail "You are free to fork EasyEngine (ee): https://github.com/rtCamp/easyengine/fork" - ee_lib_echo_fail "EasyEngine (ee) only support Ubuntu 12.04/14.04 and Debian 7.x" + ee_lib_echo_fail "EasyEngine (ee) only support Ubuntu 12.04/14.04 and Debian 7.x/8.x" exit 100 fi # EasyEngine (ee) only support all Ubuntu/Debian distro except the distro reached EOL lsb_release -d | egrep -e "12.04|14.04|wheezy|jessie" &>> /dev/null if [ "$?" -ne "0" ]; then - ee_lib_echo_fail "EasyEngine (ee) only support Ubuntu 12.04/14.04 and Debian 7.x" + ee_lib_echo_fail "EasyEngine (ee) only support Ubuntu 12.04/14.04 and Debian 7.x/8.x" exit 100 fi @@ -320,6 +320,14 @@ function ee_update_latest() echo -e "upstream hhvm {\n# HHVM Pool\nserver 127.0.0.1:8000;\nserver 127.0.0.1:9000 backup;\n}\n" >> /etc/nginx/conf.d/upstream.conf fi fi + + # Fix white screen of death as SCRIPT_FILENAME is not defined into /etc/nginx/fastcgi_params + if [ -f /etc/nginx/fastcgi_params ]; then + grep -Hr SCRIPT_FILENAME /etc/nginx/fastcgi_params &>> /dev/null + if [ $? -ne 0 ]; then + echo -e "fastcgi_param \tSCRIPT_FILENAME \t\$request_filename;\n" >> /etc/nginx/fastcgi_params + fi + fi } # Do git intialisation @@ -381,9 +389,11 @@ else ee_git_init | tee -ai $ee_install_log service nginx reload &>> /dev/null service php5-fpm restart &>> /dev/null + else + ee_lib_error "Not updating EasyEngine to $ee_version_new, exit status = " 1 fi else - ee_lib_echo_fail "You already have EasyEngine $ee_version_new, exit status = " $? | tee -ai $ee_install_log + ee_lib_error "You already have EasyEngine $ee_version_new, exit status = " $? | tee -ai $ee_install_log fi fi ee sync | tee -ai $EE_INSTALL_LOG @@ -393,5 +403,5 @@ ee_lib_echo "For EasyEngine (ee) auto completion, run the following command" echo ee_lib_echo_info "source /etc/bash_completion.d/ee_auto.rc" echo -ee_lib_echo "EasyEngine (ee) installed successfully" +ee_lib_echo "EasyEngine (ee) installed/updated successfully" ee_lib_echo "EasyEngine (ee) help: http://docs.rtcamp.com/easyengine/" diff --git a/setup.py b/setup.py index 7d8b8269..bbf9bfe8 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ except Exception as e: os.system("git config --global user.email {0}".format(ee_email)) setup(name='ee', - version='3.1.6', + version='3.1.7', description=long_description, long_description=long_description, classifiers=[],