From a4a6933a24c5c2a51a175dfbeeeb04ef64f5ed01 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Wed, 18 Feb 2015 20:15:37 +0530 Subject: [PATCH 01/11] Fixed: Wordpress debug was quiting for html site --- ee/cli/plugins/debug.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ee/cli/plugins/debug.py b/ee/cli/plugins/debug.py index 9728a563..29ec309b 100644 --- a/ee/cli/plugins/debug.py +++ b/ee/cli/plugins/debug.py @@ -103,7 +103,7 @@ class EEDebugController(CementBaseController): self.trigger_nginx = True else: - Log.info(self, "Debug for site allready enabled") + Log.info(self, "Nginx debug for site allready enabled") self.msg = self.msg + ['{0}{1}/logs/error.log' .format(EEVariables.ee_webroot, @@ -129,7 +129,7 @@ class EEDebugController(CementBaseController): else: - Log.info(self, "Debug for site allready disabled") + Log.info(self, "Nginx debug for site allready disabled") else: Log.info(self, "{0} domain not valid" .format(self.app.pargs.site_name)) @@ -273,7 +273,7 @@ class EEDebugController(CementBaseController): def debug_wp(self): """Start/Stop WordPress debug""" if self.start and self.app.pargs.site_name: - wp_config = ("{0}{1}/wp-config.php" + wp_config = ("{0}/{1}/wp-config.php" .format(EEVariables.ee_webroot, self.app.pargs.site_name)) webroot = "{0}{1}".format(EEVariables.ee_webroot, @@ -301,8 +301,6 @@ class EEDebugController(CementBaseController): "wp-content/plugins" .format(webroot, EEVariables.ee_php_user)) - else: - Log.info(self, "WordPress debug log already enabled") self.msg = self.msg + ['{0}{1}/htdocs/wp-content' '/debug.log' @@ -337,9 +335,6 @@ class EEDebugController(CementBaseController): "true);/d\" {0}".format(wp_config)) else: Log.info(self, "WordPress debug all already disabled") - else: - Log.error(self, "{0} domain not valid" - .format(self.app.pargs.site_name)) else: Log.error(self, "Missing argument site name") From 51f47cec23ac5ce7c35893a27705f7286315f419 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Wed, 18 Feb 2015 20:37:00 +0530 Subject: [PATCH 02/11] Fixed #426 --- ee/cli/plugins/stack.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 848436a0..14c0382c 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -442,6 +442,7 @@ class EEStackController(CementBaseController): config = configparser.ConfigParser() config.read('/etc/php5/fpm/pool.d/debug.conf') config['debug']['listen'] = '127.0.0.1:9001' + config['debug']['rlimit_core'] = 'unlimited' with open('/etc/php5/fpm/pool.d/debug.conf', encoding='utf-8', mode='w') as confifile: Log.debug(self, "writting PHP5 configuration into " From 14ec8c9314fd806bfb106a381f915b75e7bd5d4e Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Thu, 19 Feb 2015 13:47:42 +0530 Subject: [PATCH 03/11] default argument needed handled --- ee/cli/plugins/site.py | 65 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index 5101832c..dae89cda 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -29,7 +29,7 @@ class EESiteController(CementBaseController): description = ('Performs website specific operations') arguments = [ (['site_name'], - dict(help='Website name')), + dict(help='Website name', nargs='?')), ] @expose(hide=True) @@ -38,6 +38,11 @@ class EESiteController(CementBaseController): @expose(help="Enable site example.com") def enable(self): + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) Log.info(self, "Enable domain {0:10} \t".format(ee_domain), end='') if os.path.isfile('/etc/nginx/sites-available/{0}' @@ -58,6 +63,11 @@ class EESiteController(CementBaseController): @expose(help="Disable site example.com") def disable(self): + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) Log.info(self, "Disable domain {0:10} \t".format(ee_domain), end='') if os.path.isfile('/etc/nginx/sites-available/{0}' @@ -81,6 +91,11 @@ class EESiteController(CementBaseController): @expose(help="Get example.com information") def info(self): + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) ee_db_name = '' ee_db_user = '' @@ -135,6 +150,11 @@ class EESiteController(CementBaseController): @expose(help="Edit Nginx configuration of example.com") def edit(self): + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) if os.path.isfile('/etc/nginx/sites-available/{0}' .format(ee_domain)): @@ -151,6 +171,11 @@ class EESiteController(CementBaseController): @expose(help="Display Nginx configuration of example.com") def show(self): + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') # TODO Write code for ee site edit command here (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) if os.path.isfile('/etc/nginx/sites-available/{0}' @@ -167,7 +192,11 @@ class EESiteController(CementBaseController): @expose(help="Change directory to site webroot") def cd(self): - + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) if os.path.isfile('/etc/nginx/sites-available/{0}' .format(ee_domain)): @@ -189,7 +218,8 @@ class EESiteCreateController(CementBaseController): 'required files as options are provided') arguments = [ (['site_name'], - dict(help='domain name for the site to be created.')), + dict(help='domain name for the site to be created.', + nargs='?')), (['--html'], dict(help="create html site", action='store_true')), (['--php'], @@ -220,6 +250,18 @@ class EESiteCreateController(CementBaseController): def default(self): # self.app.render((data), 'default.mustache') # Check domain name validation + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') + if not (self.app.pargs.html or self.app.pargs.php or + self.app.pargs.mysql or self.app.pargs.wp or + self.app.pargs.w3tc or self.app.pargs.wpfc or + self.app.pargs.wpsc or self.app.pargs.wpsubdir or + self.app.pargs.wpsubdomain): + self.app.pargs.html = True + data = '' (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) ee_site_webroot = EEVariables.ee_webroot + ee_domain @@ -494,7 +536,8 @@ class EESiteUpdateController(CementBaseController): 'another as per the options are provided') arguments = [ (['site_name'], - dict(help='domain name for the site to be updated')), + dict(help='domain name for the site to be updated', + nargs='?')), (['--password'], dict(help="update to password for wordpress site user", action='store_true')), @@ -521,6 +564,11 @@ class EESiteUpdateController(CementBaseController): @expose(help="Update site type or cache") def default(self): + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') data = '' (ee_domain, ee_www_domain, ) = ValidateDomain(self.app.pargs.site_name) @@ -947,7 +995,7 @@ class EESiteDeleteController(CementBaseController): description = 'delete an existing website' arguments = [ (['site_name'], - dict(help='domain name to be deleted')), + dict(help='domain name to be deleted', nargs='?')), (['--no-prompt'], dict(help="doesnt ask permission for delete", action='store_true')), @@ -962,12 +1010,15 @@ class EESiteDeleteController(CementBaseController): @expose(help="Delete website configuration and files") @expose(hide=True) def default(self): - # TODO Write code for ee site update here + if not self.app.pargs.site_name: + try: + self.app.pargs.site_name = input('Enter site name : ') + except IOError as e: + Log.error(self, 'could not input site name') (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) ee_db_name = '' ee_prompt = '' ee_nginx_prompt = '' - if ((not self.app.pargs.db) and (not self.app.pargs.files) and (not self.app.pargs.all)): self.app.pargs.all = True From d543db391eadcdc3220a6631ce0ac95c02549b24 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 19 Feb 2015 15:39:28 +0530 Subject: [PATCH 04/11] Fixes #428 --- ee/cli/plugins/stack_services.py | 75 ++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/ee/cli/plugins/stack_services.py b/ee/cli/plugins/stack_services.py index 88886061..dd184afd 100644 --- a/ee/cli/plugins/stack_services.py +++ b/ee/cli/plugins/stack_services.py @@ -2,6 +2,7 @@ from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from ee.core.services import EEService from ee.core.logging import Log +from ee.core.variables import EEVariables class EEStackStatusController(CementBaseController): @@ -28,8 +29,12 @@ class EEStackStatusController(CementBaseController): Log.debug(self, "php5-fpm service start") services = services + ['php5-fpm'] if self.app.pargs.mysql: - Log.debug(self, "mysql service start") - services = services + ['mysql'] + if EEVariables.ee_mysql_host is "localhost": + Log.debug(self, "mysql service start") + services = services + ['mysql'] + else: + Log.warn(self, "Remote MySQL found," + "unable to start MySQL service") if self.app.pargs.postfix: Log.debug(self, "postfix service start") services = services + ['postfix'] @@ -39,9 +44,13 @@ class EEStackStatusController(CementBaseController): if self.app.pargs.dovecot: Log.debug(self, "dovecot service start") services = services + ['dovecot'] - if not services: - Log.debug(self, "nginx,php5-fpm,mysql,postfix services start") + if not services and EEVariables.ee_mysql_host is "localhost": services = services + ['nginx', 'php5-fpm', 'mysql', 'postfix'] + Log.debug(self, "nginx,php5-fpm,mysql,postfix services start") + elif not services: + services = services + ['nginx', 'php5-fpm', 'postfix'] + Log.debug(self, "nginx,php5-fpm,postfix services start") + for service in services: EEService.start_service(self, service) @@ -56,8 +65,12 @@ class EEStackStatusController(CementBaseController): Log.debug(self, "php5-fpm service stop") services = services + ['php5-fpm'] if self.app.pargs.mysql: - Log.debug(self, "mysql service stop") - services = services + ['mysql'] + if EEVariables.ee_mysql_host is "localhost": + Log.debug(self, "mysql service stop") + services = services + ['mysql'] + else: + Log.warn(self, "Remote MySQL found, " + "unable to stop MySQL service") if self.app.pargs.postfix: Log.debug(self, "postfix service stop") services = services + ['postfix'] @@ -67,9 +80,12 @@ class EEStackStatusController(CementBaseController): if self.app.pargs.dovecot: Log.debug(self, "dovecot service stop") services = services + ['dovecot'] - if not services: + if not services and EEVariables.ee_mysql_host is "localhost": services = services + ['nginx', 'php5-fpm', 'mysql', 'postfix'] Log.debug(self, "nginx,php5-fpm,mysql,postfix services stop") + elif not services: + services = services + ['nginx', 'php5-fpm', 'postfix'] + Log.debug(self, "nginx,php5-fpm,postfix services stop") for service in services: EEService.stop_service(self, service) @@ -84,8 +100,12 @@ class EEStackStatusController(CementBaseController): Log.debug(self, "php5-fpm service restart") services = services + ['php5-fpm'] if self.app.pargs.mysql: - Log.debug(self, "mysql service restart") - services = services + ['mysql'] + if EEVariables.ee_mysql_host is "localhost": + Log.debug(self, "mysql service restart") + services = services + ['mysql'] + else: + Log.warn(self, "Remote MySQL found, " + "unable to restart MySQL service") if self.app.pargs.postfix: Log.debug(self, "postfix service restart") services = services + ['postfix'] @@ -95,10 +115,13 @@ class EEStackStatusController(CementBaseController): if self.app.pargs.dovecot: Log.debug(self, "dovecot service restart") services = services + ['dovecot'] - if not services: + if not services and EEVariables.ee_mysql_host is "localhost": services = services + ['nginx', 'php5-fpm', 'mysql', 'postfix'] - for service in services: Log.debug(self, "nginx,php5-fpm,mysql,postfix services restart") + elif not services: + services = services + ['nginx', 'php5-fpm', 'postfix'] + Log.debug(self, "nginx,php5-fpm,postfix services restart") + for service in services: EEService.restart_service(self, service) @expose(help="Get stack status") @@ -112,8 +135,12 @@ class EEStackStatusController(CementBaseController): Log.debug(self, "php5-fpm service status") services = services + ['php5-fpm'] if self.app.pargs.mysql: - Log.debug(self, "mysql service status") - services = services + ['mysql'] + if EEVariables.ee_mysql_host is "localhost": + Log.debug(self, "mysql service status") + services = services + ['mysql'] + else: + Log.warn(self, "Remote MySQL found, " + "unable to get MySQL service status") if self.app.pargs.postfix: services = services + ['postfix'] Log.debug(self, "postfix service status") @@ -123,9 +150,12 @@ class EEStackStatusController(CementBaseController): if self.app.pargs.dovecot: Log.debug(self, "dovecot service status") services = services + ['dovecot'] - if not services: - Log.debug(self, "nginx,php5-fpm,mysql,postfix services status") + if not services and EEVariables.ee_mysql_host is "localhost": services = services + ['nginx', 'php5-fpm', 'mysql', 'postfix'] + Log.debug(self, "nginx,php5-fpm,mysql,postfix services status") + elif not services: + services = services + ['nginx', 'php5-fpm', 'postfix'] + Log.debug(self, "nginx,php5-fpm,postfix services status") for service in services: if EEService.get_service_status(self, service): Log.info(self, "{0:10}: {1}".format(service, "Running")) @@ -141,8 +171,12 @@ class EEStackStatusController(CementBaseController): Log.debug(self, "php5-fpm service reload") services = services + ['php5-fpm'] if self.app.pargs.mysql: - Log.debug(self, "mysql service reload") - services = services + ['mysql'] + if EEVariables.ee_mysql_host is "localhost": + Log.debug(self, "mysql service reload") + services = services + ['mysql'] + else: + Log.warn(self, "Remote MySQL found, " + "unable to remote MySQL service") if self.app.pargs.postfix: Log.debug(self, "postfix service reload") services = services + ['postfix'] @@ -152,8 +186,11 @@ class EEStackStatusController(CementBaseController): if self.app.pargs.dovecot: Log.debug(self, "dovecot service reload") services = services + ['dovecot'] - if not services: + if not services and EEVariables.ee_mysql_host is "localhost": services = services + ['nginx', 'php5-fpm', 'mysql', 'postfix'] - for service in services: Log.debug(self, "nginx,php5-fpm,mysql,postfix services reload") + elif not services: + services = services + ['nginx', 'php5-fpm', 'postfix'] + Log.debug(self, "nginx,php5-fpm,postfix services reload") + for service in services: EEService.reload_service(self, service) From f3e9c3a51cf243a14d4c763a0cca5070ea357868 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 20 Feb 2015 15:09:03 +0530 Subject: [PATCH 05/11] Fixed ViMbAdmin template encoding issue, based on https://github.com/datafolklabs/cement/issues/295 --- ee/cli/main.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ee/cli/main.py b/ee/cli/main.py index 98de372f..ef828f51 100644 --- a/ee/cli/main.py +++ b/ee/cli/main.py @@ -13,8 +13,11 @@ else: from cement.core import foundation from cement.utils.misc import init_defaults from cement.core.exc import FrameworkError, CaughtSignal +from cement.utils import fs +from cement.ext.ext_mustache import MustacheOutputHandler from ee.core import exc + # Application default. Should update config/ee.conf to reflect any # changes, or additions here. defaults = init_defaults('ee') @@ -29,6 +32,23 @@ defaults['ee']['plugin_dir'] = '/var/lib/ee/plugins' defaults['ee']['template_dir'] = '/var/lib/ee/templates' +# Based on https://github.com/datafolklabs/cement/issues/295 +# To avoid encoding releated error,we defined our custom output handler +# I hope we will remove this when we upgarde to Cement 2.6 (Not released yet) +class EEOutputHandler(MustacheOutputHandler): + class Meta: + label = 'ee_output_handler' + + def _load_template_from_file(self, path): + for templ_dir in self.app._meta.template_dirs: + full_path = fs.abspath(os.path.join(templ_dir, path)) + if os.path.exists(full_path): + self.app.log.debug('loading template file %s' % full_path) + return open(full_path, encoding='utf-8', mode='r').read() + else: + continue + + class EEApp(foundation.CementApp): class Meta: label = 'ee' @@ -50,7 +70,7 @@ class EEApp(foundation.CementApp): extensions = ['mustache'] # default output handler - output_handler = 'mustache' + output_handler = EEOutputHandler debug = TOGGLE_DEBUG From 2f6b0c65d8495c6f07b1f598c063af7fff7432e8 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 20 Feb 2015 15:35:36 +0530 Subject: [PATCH 06/11] Now EasyEngine will not enable debug for remote MySQL --- ee/cli/plugins/debug.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/ee/cli/plugins/debug.py b/ee/cli/plugins/debug.py index 29ec309b..767b526a 100644 --- a/ee/cli/plugins/debug.py +++ b/ee/cli/plugins/debug.py @@ -445,19 +445,19 @@ class EEDebugController(CementBaseController): and (not self.app.pargs.fpm) and (not self.app.pargs.mysql) and (not self.app.pargs.wp) and (not self.app.pargs.rewrite) and (not self.app.pargs.site_name)): - self.debug_nginx() - self.debug_php() - self.debug_fpm() - self.debug_mysql() - self.debug_rewrite() + self.app.pargs.nginx = True + self.app.pargs.php = True + self.app.pargs.fpm = True + self.app.pargs.mysql = True + self.app.pargs.rewrite = True if ((not self.app.pargs.nginx) and (not self.app.pargs.php) and (not self.app.pargs.fpm) and (not self.app.pargs.mysql) and (not self.app.pargs.wp) and (not self.app.pargs.rewrite) and self.app.pargs.site_name): - self.debug_nginx() - self.debug_wp() - self.debug_rewrite() + self.app.pargs.nginx = True + self.app.pargs.wp = True + self.app.pargs.rewrite = True if self.app.pargs.nginx: self.debug_nginx() @@ -466,7 +466,12 @@ class EEDebugController(CementBaseController): if self.app.pargs.fpm: self.debug_fpm() if self.app.pargs.mysql: - self.debug_mysql() + # MySQL debug will not work for remote MySQL + if EEVariables.ee_mysql_host is "localhost": + self.debug_mysql() + else: + Log.warn(self, "Remote MySQL found, EasyEngine will not " + "enable remote debug") if self.app.pargs.wp: self.debug_wp() if self.app.pargs.rewrite: From 35c080e504d0cea6d8da17f09bba175e4af6e131 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 20 Feb 2015 15:59:29 +0530 Subject: [PATCH 07/11] Disabled MySQL debug for -i paramater also --- ee/cli/plugins/debug.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ee/cli/plugins/debug.py b/ee/cli/plugins/debug.py index 767b526a..68e48d84 100644 --- a/ee/cli/plugins/debug.py +++ b/ee/cli/plugins/debug.py @@ -414,7 +414,12 @@ class EEDebugController(CementBaseController): if self.app.pargs.fpm: self.debug_fpm() if self.app.pargs.mysql: - self.debug_mysql() + # MySQL debug will not work for remote MySQL + if EEVariables.ee_mysql_host is "localhost": + self.debug_mysql() + else: + Log.warn(self, "Remote MySQL found, EasyEngine will not " + "enable remote debug") if self.app.pargs.wp: self.debug_wp() if self.app.pargs.rewrite: From 9b85798c8e5d2cff48cdf8d3b4675d6051097cf4 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 20 Feb 2015 16:19:14 +0530 Subject: [PATCH 08/11] Added unset LANG to travis to always test without any LANG value --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1ed05379..2c09927d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ before_script: - sudo apt-get update script: + - unset LANG - sudo echo -e "[user]\n\tname = abc\n\temail = root@localhost.com" > ~/.gitconfig - sudo echo "Travis Banch = $TRAVIS_BRANCH" - sudo apt-get install -y --force-yes git python3-setuptools python3-dev python3-apt From 4ad7965d6a35382f9dd72a050d4137efcf004dc0 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 20 Feb 2015 17:04:37 +0530 Subject: [PATCH 09/11] Now admin tools are added to default stack --- ee/cli/plugins/stack.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 14c0382c..369cc6f6 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -1123,8 +1123,9 @@ class EEStackController(CementBaseController): (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and (not self.app.pargs.adminer) and (not self.app.pargs.utils) and - (not self.app.pargs.mailscanner)): + (not self.app.pargs.mailscanner) and (not self.app.pargs.all)): self.app.pargs.web = True + self.app.pargs.admin = True if self.app.pargs.all: self.app.pargs.web = True @@ -1330,8 +1331,9 @@ class EEStackController(CementBaseController): (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and (not self.app.pargs.adminer) and (not self.app.pargs.utils) and - (not self.app.pargs.mailscanner)): + (not self.app.pargs.mailscanner) and (not self.app.pargs.all)): self.app.pargs.web = True + self.app.pargs.admin = True if self.app.pargs.all: self.app.pargs.web = True @@ -1424,8 +1426,9 @@ class EEStackController(CementBaseController): (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and (not self.app.pargs.adminer) and (not self.app.pargs.utils) and - (not self.app.pargs.mailscanner)): + (not self.app.pargs.mailscanner) and (not self.app.pargs.all)): self.app.pargs.web = True + self.app.pargs.admin = True if self.app.pargs.all: self.app.pargs.web = True From a0978d166bbdead30eac31ee48ab434798940dc8 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 20 Feb 2015 17:07:56 +0530 Subject: [PATCH 10/11] Fixed Grammatical mistakes :P --- ee/cli/plugins/debug.py | 14 +++++++------- ee/cli/plugins/stack.py | 2 +- install | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ee/cli/plugins/debug.py b/ee/cli/plugins/debug.py index 68e48d84..a99b1a2b 100644 --- a/ee/cli/plugins/debug.py +++ b/ee/cli/plugins/debug.py @@ -103,7 +103,7 @@ class EEDebugController(CementBaseController): self.trigger_nginx = True else: - Log.info(self, "Nginx debug for site allready enabled") + Log.info(self, "Nginx debug for site already enabled") self.msg = self.msg + ['{0}{1}/logs/error.log' .format(EEVariables.ee_webroot, @@ -129,7 +129,7 @@ class EEDebugController(CementBaseController): else: - Log.info(self, "Nginx debug for site allready disabled") + Log.info(self, "Nginx debug for site already disabled") else: Log.info(self, "{0} domain not valid" .format(self.app.pargs.site_name)) @@ -154,7 +154,7 @@ class EEDebugController(CementBaseController): self.trigger_php = True self.trigger_nginx = True else: - Log.info(self, "PHP debug is allready enabled") + Log.info(self, "PHP debug is already enabled") self.msg = self.msg + ['/var/log/php5/slow.log'] @@ -174,7 +174,7 @@ class EEDebugController(CementBaseController): self.trigger_php = True self.trigger_nginx = True else: - Log.info(self, "PHP debug is allready disabled") + Log.info(self, "PHP debug is already disabled") @expose(hide=True) def debug_fpm(self): @@ -249,7 +249,7 @@ class EEDebugController(CementBaseController): "n#EasyEngine end MySQL slow log\\\";" " }} | crontab -\"".format(cron_time)) else: - Log.info(self, "MySQL slow log is allready enabled") + Log.info(self, "MySQL slow log is already enabled") self.msg = self.msg + ['/var/log/mysql/mysql-slow.log'] @@ -378,7 +378,7 @@ class EEDebugController(CementBaseController): .format(config_path)) self.trigger_nginx = True else: - Log.info(self, "Nginx rewrite logs for {0} allready setup" + Log.info(self, "Nginx rewrite logs for {0} already setup" .format(self.app.pargs.site_name)) if ('{0}{1}/logs/error.log'.format(EEVariables.ee_webroot, @@ -400,7 +400,7 @@ class EEDebugController(CementBaseController): .format(config_path)) self.trigger_nginx = True else: - Log.info(self, "Nginx rewrite logs for {0} allready " + Log.info(self, "Nginx rewrite logs for {0} already " " disabled".format(self.app.pargs.site_name)) @expose(hide=True) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 369cc6f6..083c1581 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -1246,7 +1246,7 @@ class EEStackController(CementBaseController): else: Log.error(self, "Failed to find installed Dovecot") else: - Log.error(self, "Mail scanner allready installed") + Log.error(self, "Mail scanner already installed") if self.app.pargs.utils: Log.debug(self, "Setting packages variable for utils") diff --git a/install b/install index 2ff8e4bf..2739241f 100644 --- a/install +++ b/install @@ -318,7 +318,7 @@ else service nginx reload &>> /dev/null fi else - ee_lib_echo_fail "You allready have EasyEngine $new_ee_version" | tee -ai $EE_INSTALL_LOG + ee_lib_echo_fail "You already have EasyEngine $new_ee_version" | tee -ai $EE_INSTALL_LOG exit 1 fi fi From 61fa69ebc4eefd23ff1bd403d37db0f96dec7618 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 20 Feb 2015 18:12:29 +0530 Subject: [PATCH 11/11] Improved update script, Fixes http://community.rtcamp.com/t/easy-engine-3-0-update-fails-updating-configuration/4008 --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 2739241f..aad3f451 100644 --- a/install +++ b/install @@ -175,7 +175,7 @@ function update_to_ee3() sed -i "s/X-Powered-By.*/X-Powered-By \"EasyEngine $new_ee_version\";/" /etc/nginx/nginx.conf &>> /dev/null fi - grant_host=$(grep grant-host /etc/easyengine/ee.conf | awk '{ print $3 }') + grant_host=$(grep grant-host /etc/easyengine/ee.conf | awk '{ print $3 }' | head -1 ) db_name=$(grep db-name /etc/easyengine/ee.conf | awk '{ print $3 }') db_user=$(grep db-name /etc/easyengine/ee.conf | awk '{ print $3 }') wp_prefix=$(grep prefix /etc/easyengine/ee.conf | awk '{ print $3 }')