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") Log.info(self, "WordOps dashboard already installed")
# eXtplorer # eXtplorer
if pargs.explorer: if pargs.extplorer:
if not os.path.isdir('/var/www/22222/htdocs/files'): if not os.path.isdir('/var/www/22222/htdocs/files'):
Log.debug(self, "Setting packages variable for eXtplorer") Log.debug(self, "Setting packages variable for eXtplorer")
packages = packages + \ packages = packages + \

View File

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