mirror of https://github.com/WordOps/WordOps
Fix site update --le=off
This commit is contained in:
parent
d5c9a948d0
commit
3cab41cbfe
|
@ -66,3 +66,7 @@ local/
|
|||
man/
|
||||
|
||||
\.pytest_cache/
|
||||
|
||||
\.vscode/
|
||||
|
||||
\.noseids
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1083,9 +1083,11 @@ def doupdatesite(self, pargs):
|
|||
# --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 @@ def doupdatesite(self, pargs):
|
|||
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 @@ def doupdatesite(self, pargs):
|
|||
"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 @@ def doupdatesite(self, pargs):
|
|||
" 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)):
|
||||
|
|
|
@ -1258,23 +1258,6 @@ def post_pref(self, apt_packages, packages):
|
|||
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 @@ def install(self, packages=[], apt_packages=[], disp_msg=True):
|
|||
# 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 @@ def remove(self):
|
|||
.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 @@ def purge(self):
|
|||
.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)
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue