Fix vhostonly and exit status in install

This commit is contained in:
VirtuBox
2019-08-31 17:15:38 +02:00
parent fb14df4946
commit b8623f0e32
3 changed files with 9 additions and 9 deletions

View File

@@ -499,10 +499,8 @@ class WOSiteCreateController(CementBaseController):
if data and pargs.php73:
data['php73'] = True
php73 = 1
elif data:
data['php73'] = False
php73 = 0
if ((not pargs.wpfc) and
(not pargs.wpsc) and

View File

@@ -610,7 +610,10 @@ def setupwordpress(self, data, vhostonly=False):
WOShellExec.cmd_exec(self, "/bin/bash -c \"{0} --allow-root "
.format(WOVariables.wo_wpcli_path) +
"db clean --yes\"")
WOFileUtils.rm(self, "{0}/htdocs/*".format(wo_site_webroot))
WOFileUtils.rm(self, "{0}/htdocs".format(wo_site_webroot))
WOFileUtils.mkdir(self, "{0}/htdocs".format(wo_site_webroot))
WOFileUtils.chown(self, "{0}/htdocs".format(wo_site_webroot),
'www-data', 'www-data')
except CommandExecutionError:
raise SiteError("Cleaning WordPress install failed")