Fix extplorer & simplify stack_pref

This commit is contained in:
VirtuBox
2019-09-01 16:50:13 +02:00
parent cda05da286
commit f10bcc124d
2 changed files with 113 additions and 119 deletions

View File

@@ -403,7 +403,7 @@ class WOStackController(CementBaseController):
Log.info(self, "WordOps dashboard already installed")
# eXtplorer
if pargs.explorer:
if pargs.extplorer:
if not os.path.isdir('/var/www/22222/htdocs/files'):
Log.debug(self, "Setting packages variable for eXtplorer")
packages = packages + \

View File

@@ -217,7 +217,6 @@ def post_pref(self, apt_packages, packages, upgrade=False):
'/etc/nginx/common')
os.makedirs('/etc/nginx/common')
if os.path.exists('/etc/nginx/common'):
data = dict()
# Common Configuration
@@ -267,7 +266,6 @@ def post_pref(self, apt_packages, packages, upgrade=False):
'wpce.mustache', data)
# PHP 7.3 conf
if os.path.isdir("/etc/nginx/common"):
data = dict(upstream="php73")
WOTemplate.render(self,
@@ -324,7 +322,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
WOTemplate.render(self,
'{0}/fastcgi.conf'
.format(ngxcnf),
'fastcgi.mustache', data, overwrite=False)
'fastcgi.mustache', data, overwrite=True)
# add redis cache format if not already done
if (os.path.isfile("/etc/nginx/nginx.conf") and
@@ -1364,8 +1362,6 @@ def post_pref(self, apt_packages, packages, upgrade=False):
# WordOps Dashboard
if any('/var/lib/wo/tmp/wo-dashboard.tar.gz' == x[1]
for x in packages):
if not os.path.isfile('{0}22222/htdocs/index.php'
.format(WOVariables.wo_webroot)):
Log.debug(self, "Extracting wo-dashboard.tar.gz "
"to location {0}22222/htdocs/"
.format(WOVariables.wo_webroot))
@@ -1394,9 +1390,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
# Extplorer FileManager
if any('/var/lib/wo/tmp/extplorer.tar.gz' == x[1]
for x in packages):
if not os.path.exists('{0}22222/htdocs/files'
.format(WOVariables.wo_webroot)):
Log.debug(self, "Extracting explorer.tar.gz "
Log.debug(self, "Extracting extplorer.tar.gz "
"to location {0}22222/htdocs/files"
.format(WOVariables.wo_webroot))
WOExtract.extract(self, '/var/lib/wo/tmp/extplorer.tar.gz',