Update stack_upgrade

This commit is contained in:
VirtuBox
2019-09-24 19:10:13 +02:00
parent c2683a6f77
commit 6b5cfbacd6
4 changed files with 13 additions and 13 deletions

View File

@@ -56,6 +56,7 @@ setup(name='wo',
'SQLAlchemy',
'requests',
'distro',
'apt-mirror-updater',
],
data_files=[('/etc/wo', ['config/wo.conf']),
('/etc/wo/plugins.d', conf),

View File

@@ -930,16 +930,9 @@ def updatewpuserpassword(self, wo_domain, wo_site_webroot):
wo_wp_pass = ''
WOFileUtils.chdir(self, '{0}/htdocs/'.format(wo_site_webroot))
# Check if wo_domain is wordpress install
try:
is_wp = WOShellExec.cmd_exec(self, "wp --allow-root core"
" version")
except CommandExecutionError as e:
Log.debug(self, "{0}".format(e))
raise SiteError("is WordPress site? check command failed ")
# Exit if wo_domain is not wordpress install
if not is_wp:
if not WOShellExec.cmd_exec(self, "wp --allow-root core"
" is-installed"):
# Exit if wo_domain is not wordpress install
Log.error(self, "{0} does not seem to be a WordPress site"
.format(wo_domain))
@@ -1333,8 +1326,6 @@ def doCleanupAction(self, domain='', webroot='', dbname='', dbuser='',
if os.path.isfile('/etc/nginx/sites-available/{0}'
.format(domain)):
removeNginxConf(self, domain)
if os.path.isdir('/etc/letsencrypt/renewal/{0}_ecc'
.format(domain)):
removeAcmeConf(self, domain)
if webroot:

View File

@@ -209,9 +209,17 @@ class WOStackUpgradeController(CementBaseController):
if ["php7.2-fpm"] in apt_packages:
WOAptGet.remove(self, ['php7.2-fpm'],
auto=False, purge=True)
WOFileUtils.rm(
self, '/etc/php/7.2/fpm/pool.d/www.conf')
WOFileUtils.rm(
self, '/etc/php/7.2/fpm/pool.d/www-two.conf')
if ["php7.3-fpm"] in apt_packages:
WOAptGet.remove(self, ['php7.3-fpm'],
auto=False, purge=True)
WOFileUtils.rm(
self, '/etc/php/7.3/fpm/pool.d/www.conf')
WOFileUtils.rm(
self, '/etc/php/7.3/fpm/pool.d/www-two.conf')
# check if nginx upgrade is blocked
if os.path.isfile(

View File

@@ -18,7 +18,7 @@ class WOAptGet():
"""
try:
with open('/var/log/wo/wordops.log', 'a') as f:
proc = subprocess.Popen('apt-get update',
proc = subprocess.Popen('apt-mirror-updater -u',
shell=True,
stdin=None, stdout=f,
stderr=subprocess.PIPE,