diff --git a/.gitignore b/.gitignore index 601587c..b79b87e 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,7 @@ local/ man/ \.pytest_cache/ + +\.vscode/ + +\.noseids diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a5d028..6ebd828 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,11 +17,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), #### Changed - phpRedisAdmin is now installed with the stack "--admin" +- Remove memcached - not required anymore #### Fixed - phpRedisAdmin installation - Duplicated locations /robots.txt after upgrade to v3.9.5.3 +- Site update with flag "--le=off" ### v3.9.5.3 - 2019-06-18 diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index e8c1db7..edd732b 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -1083,9 +1083,11 @@ class WOSiteUpdateController(CementBaseController): # --letsencrypt=renew code goes here if pargs.letsencrypt == "renew" and not pargs.all: expiry_days = SSL.getExpirationDays(self, wo_domain) - min_expiry_days = 30 + min_expiry_days = 45 if check_ssl: - if (expiry_days <= min_expiry_days) or pargs.force: + if (expiry_days <= min_expiry_days): + renewLetsEncrypt(self, wo_domain) + elif pargs.force: renewLetsEncrypt(self, wo_domain) else: Log.error( @@ -1121,8 +1123,15 @@ class WOSiteUpdateController(CementBaseController): expiry_days = SSL.getExpirationDays(self, wo_domain, True) if expiry_days < 0: return 0 - min_expiry_days = 30 - if (expiry_days <= min_expiry_days) or pargs.force: + min_expiry_days = 45 + if (expiry_days <= min_expiry_days): + renewLetsEncrypt(self, ee_domain) + if not WOService.reload_service(self, 'nginx'): + Log.error(self, "service nginx reload failed. " + "check issues with `nginx -t` command") + Log.info(self, "SUCCESS: Certificate was successfully " + "renewed For https://{0}".format(wo_domain)) + elif pargs.force: renewLetsEncrypt(self, ee_domain) Log.info(self, "Certificate was successfully renewed") if not WOService.reload_service(self, 'nginx'): @@ -1132,7 +1141,7 @@ class WOSiteUpdateController(CementBaseController): "renewed For https://{0}".format(wo_domain)) else: Log.info( - self, "You have more than 30 days with the current " + self, "You have more than 45 days with the current " "certificate - refusing to run.\n") if (SSL.getExpirationDays(self, wo_domain) > 0): @@ -1264,7 +1273,7 @@ class WOSiteUpdateController(CementBaseController): " http://{0}".format(wo_domain)) return 0 - if pargs.letsencrypt == "on": + if pargs.letsencrypt: if data['letsencrypt'] is True: if not os.path.isfile("{0}/conf/nginx/ssl.conf.disabled" .format(wo_site_webroot)): diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index e487792..78217d1 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -1258,23 +1258,6 @@ class WOStackController(CementBaseController): WOVariables.wo_php_user, recursive=True) - # phpmemcachedadmin - if any('/var/lib/wo/tmp/memcached.tar.gz' == x[1] - for x in packages): - Log.debug(self, "Extracting memcached.tar.gz to location" - " {0}22222/htdocs/cache/memcache " - .format(WOVariables.wo_webroot)) - WOExtract.extract(self, '/var/lib/wo/tmp/memcached.tar.gz', - '{0}22222/htdocs/cache/memcache' - .format(WOVariables.wo_webroot)) - Log.debug(self, "Setting Privileges to " - "{0}22222/htdocs/cache/memcache file" - .format(WOVariables.wo_webroot)) - WOFileUtils.chown(self, '{0}22222' - .format(WOVariables.wo_webroot), - WOVariables.wo_php_user, - WOVariables.wo_php_user, - recursive=True) # webgrind if any('/var/lib/wo/tmp/webgrind.tar.gz' == x[1] for x in packages): @@ -1619,12 +1602,7 @@ class WOStackController(CementBaseController): # UTILS if self.app.pargs.utils: Log.debug(self, "Setting packages variable for utils") - packages = packages + [["https://github.com/elijaa/" - "phpmemcachedadmin/archive/" - "1.3.0.tar.gz", - '/var/lib/wo/tmp/memcached.tar.gz', - 'phpMemcachedAdmin'], - ["https://raw.githubusercontent.com" + packages = packages + [["https://raw.githubusercontent.com" "/rtCamp/eeadmin/master/cache/nginx/" "clean.php", "{0}22222/htdocs/cache/" @@ -1854,8 +1832,6 @@ class WOStackController(CementBaseController): .format(WOVariables.wo_webroot), '{0}22222/htdocs/cache/nginx/' 'clean.php'.format(WOVariables.wo_webroot), - '{0}22222/htdocs/cache/memcache' - .format(WOVariables.wo_webroot), '/usr/bin/pt-query-advisor', '{0}22222/htdocs/db/anemometer' .format(WOVariables.wo_webroot)] @@ -2021,8 +1997,6 @@ class WOStackController(CementBaseController): .format(WOVariables.wo_webroot), '{0}22222/htdocs/cache/nginx/' 'clean.php'.format(WOVariables.wo_webroot), - '{0}22222/htdocs/cache/memcache' - .format(WOVariables.wo_webroot), '/usr/bin/pt-query-advisor', '{0}22222/htdocs/db/anemometer' .format(WOVariables.wo_webroot) diff --git a/wo/core/variables.py b/wo/core/variables.py index b4f1412..6a09dd3 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -127,7 +127,7 @@ class WOVariables(): "php7.3-cli", "php7.3-mbstring", "php7.3-bcmath", "php7.3-mysql", "php7.3-opcache", "php7.3-zip", "php7.3-xml", "php7.3-soap"] - wo_php_extra = ["php-memcached", "php-imagick", "memcached", + wo_php_extra = ["php-memcached", "php-imagick", "graphviz", "php-xdebug", "php-msgpack", "php-redis"] wo_php_key = '' else: @@ -144,7 +144,7 @@ class WOVariables(): "php7.3-cli", "php7.3-mbstring", "php7.3-bcmath", "php7.3-mysql", "php7.3-opcache", "php7.3-zip", "php7.3-xml", "php7.3-soap"] - wo_php_extra = ["php-memcached", "php-imagick", "memcached", + wo_php_extra = ["php-memcached", "php-imagick", "graphviz", "php-xdebug", "php-msgpack", "php-redis"] wo_php_key = 'AC0E47584A7A714D'