Fix extplorer & simplify stack_pref
This commit is contained in:
@@ -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 + \
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user