Fix site update --le=off
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -66,3 +66,7 @@ local/
|
|||||||
man/
|
man/
|
||||||
|
|
||||||
\.pytest_cache/
|
\.pytest_cache/
|
||||||
|
|
||||||
|
\.vscode/
|
||||||
|
|
||||||
|
\.noseids
|
||||||
|
|||||||
@@ -17,11 +17,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
#### Changed
|
#### Changed
|
||||||
|
|
||||||
- phpRedisAdmin is now installed with the stack "--admin"
|
- phpRedisAdmin is now installed with the stack "--admin"
|
||||||
|
- Remove memcached - not required anymore
|
||||||
|
|
||||||
#### Fixed
|
#### Fixed
|
||||||
|
|
||||||
- phpRedisAdmin installation
|
- phpRedisAdmin installation
|
||||||
- Duplicated locations /robots.txt after upgrade to v3.9.5.3
|
- Duplicated locations /robots.txt after upgrade to v3.9.5.3
|
||||||
|
- Site update with flag "--le=off"
|
||||||
|
|
||||||
### v3.9.5.3 - 2019-06-18
|
### v3.9.5.3 - 2019-06-18
|
||||||
|
|
||||||
|
|||||||
@@ -1083,9 +1083,11 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
# --letsencrypt=renew code goes here
|
# --letsencrypt=renew code goes here
|
||||||
if pargs.letsencrypt == "renew" and not pargs.all:
|
if pargs.letsencrypt == "renew" and not pargs.all:
|
||||||
expiry_days = SSL.getExpirationDays(self, wo_domain)
|
expiry_days = SSL.getExpirationDays(self, wo_domain)
|
||||||
min_expiry_days = 30
|
min_expiry_days = 45
|
||||||
if check_ssl:
|
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)
|
renewLetsEncrypt(self, wo_domain)
|
||||||
else:
|
else:
|
||||||
Log.error(
|
Log.error(
|
||||||
@@ -1121,8 +1123,15 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
expiry_days = SSL.getExpirationDays(self, wo_domain, True)
|
expiry_days = SSL.getExpirationDays(self, wo_domain, True)
|
||||||
if expiry_days < 0:
|
if expiry_days < 0:
|
||||||
return 0
|
return 0
|
||||||
min_expiry_days = 30
|
min_expiry_days = 45
|
||||||
if (expiry_days <= min_expiry_days) or pargs.force:
|
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)
|
renewLetsEncrypt(self, ee_domain)
|
||||||
Log.info(self, "Certificate was successfully renewed")
|
Log.info(self, "Certificate was successfully renewed")
|
||||||
if not WOService.reload_service(self, 'nginx'):
|
if not WOService.reload_service(self, 'nginx'):
|
||||||
@@ -1132,7 +1141,7 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
"renewed For https://{0}".format(wo_domain))
|
"renewed For https://{0}".format(wo_domain))
|
||||||
else:
|
else:
|
||||||
Log.info(
|
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")
|
"certificate - refusing to run.\n")
|
||||||
|
|
||||||
if (SSL.getExpirationDays(self, wo_domain) > 0):
|
if (SSL.getExpirationDays(self, wo_domain) > 0):
|
||||||
@@ -1264,7 +1273,7 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
" http://{0}".format(wo_domain))
|
" http://{0}".format(wo_domain))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if pargs.letsencrypt == "on":
|
if pargs.letsencrypt:
|
||||||
if data['letsencrypt'] is True:
|
if data['letsencrypt'] is True:
|
||||||
if not os.path.isfile("{0}/conf/nginx/ssl.conf.disabled"
|
if not os.path.isfile("{0}/conf/nginx/ssl.conf.disabled"
|
||||||
.format(wo_site_webroot)):
|
.format(wo_site_webroot)):
|
||||||
|
|||||||
@@ -1258,23 +1258,6 @@ class WOStackController(CementBaseController):
|
|||||||
WOVariables.wo_php_user,
|
WOVariables.wo_php_user,
|
||||||
recursive=True)
|
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
|
# webgrind
|
||||||
if any('/var/lib/wo/tmp/webgrind.tar.gz' == x[1]
|
if any('/var/lib/wo/tmp/webgrind.tar.gz' == x[1]
|
||||||
for x in packages):
|
for x in packages):
|
||||||
@@ -1619,12 +1602,7 @@ class WOStackController(CementBaseController):
|
|||||||
# UTILS
|
# UTILS
|
||||||
if self.app.pargs.utils:
|
if self.app.pargs.utils:
|
||||||
Log.debug(self, "Setting packages variable for utils")
|
Log.debug(self, "Setting packages variable for utils")
|
||||||
packages = packages + [["https://github.com/elijaa/"
|
packages = packages + [["https://raw.githubusercontent.com"
|
||||||
"phpmemcachedadmin/archive/"
|
|
||||||
"1.3.0.tar.gz",
|
|
||||||
'/var/lib/wo/tmp/memcached.tar.gz',
|
|
||||||
'phpMemcachedAdmin'],
|
|
||||||
["https://raw.githubusercontent.com"
|
|
||||||
"/rtCamp/eeadmin/master/cache/nginx/"
|
"/rtCamp/eeadmin/master/cache/nginx/"
|
||||||
"clean.php",
|
"clean.php",
|
||||||
"{0}22222/htdocs/cache/"
|
"{0}22222/htdocs/cache/"
|
||||||
@@ -1854,8 +1832,6 @@ class WOStackController(CementBaseController):
|
|||||||
.format(WOVariables.wo_webroot),
|
.format(WOVariables.wo_webroot),
|
||||||
'{0}22222/htdocs/cache/nginx/'
|
'{0}22222/htdocs/cache/nginx/'
|
||||||
'clean.php'.format(WOVariables.wo_webroot),
|
'clean.php'.format(WOVariables.wo_webroot),
|
||||||
'{0}22222/htdocs/cache/memcache'
|
|
||||||
.format(WOVariables.wo_webroot),
|
|
||||||
'/usr/bin/pt-query-advisor',
|
'/usr/bin/pt-query-advisor',
|
||||||
'{0}22222/htdocs/db/anemometer'
|
'{0}22222/htdocs/db/anemometer'
|
||||||
.format(WOVariables.wo_webroot)]
|
.format(WOVariables.wo_webroot)]
|
||||||
@@ -2021,8 +1997,6 @@ class WOStackController(CementBaseController):
|
|||||||
.format(WOVariables.wo_webroot),
|
.format(WOVariables.wo_webroot),
|
||||||
'{0}22222/htdocs/cache/nginx/'
|
'{0}22222/htdocs/cache/nginx/'
|
||||||
'clean.php'.format(WOVariables.wo_webroot),
|
'clean.php'.format(WOVariables.wo_webroot),
|
||||||
'{0}22222/htdocs/cache/memcache'
|
|
||||||
.format(WOVariables.wo_webroot),
|
|
||||||
'/usr/bin/pt-query-advisor',
|
'/usr/bin/pt-query-advisor',
|
||||||
'{0}22222/htdocs/db/anemometer'
|
'{0}22222/htdocs/db/anemometer'
|
||||||
.format(WOVariables.wo_webroot)
|
.format(WOVariables.wo_webroot)
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ class WOVariables():
|
|||||||
"php7.3-cli", "php7.3-mbstring",
|
"php7.3-cli", "php7.3-mbstring",
|
||||||
"php7.3-bcmath", "php7.3-mysql", "php7.3-opcache",
|
"php7.3-bcmath", "php7.3-mysql", "php7.3-opcache",
|
||||||
"php7.3-zip", "php7.3-xml", "php7.3-soap"]
|
"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"]
|
"graphviz", "php-xdebug", "php-msgpack", "php-redis"]
|
||||||
wo_php_key = ''
|
wo_php_key = ''
|
||||||
else:
|
else:
|
||||||
@@ -144,7 +144,7 @@ class WOVariables():
|
|||||||
"php7.3-cli", "php7.3-mbstring",
|
"php7.3-cli", "php7.3-mbstring",
|
||||||
"php7.3-bcmath", "php7.3-mysql", "php7.3-opcache",
|
"php7.3-bcmath", "php7.3-mysql", "php7.3-opcache",
|
||||||
"php7.3-zip", "php7.3-xml", "php7.3-soap"]
|
"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"]
|
"graphviz", "php-xdebug", "php-msgpack", "php-redis"]
|
||||||
|
|
||||||
wo_php_key = 'AC0E47584A7A714D'
|
wo_php_key = 'AC0E47584A7A714D'
|
||||||
|
|||||||
Reference in New Issue
Block a user