Add more conf with WOTemplate
This commit is contained in:
@@ -192,33 +192,21 @@ def post_pref(self, apt_packages, packages):
|
|||||||
WOTemplate.tmpl_render(
|
WOTemplate.tmpl_render(
|
||||||
self, '{0}/upstream.conf'.format(ngxcnf),
|
self, '{0}/upstream.conf'.format(ngxcnf),
|
||||||
'upstream.mustache', data, overwrite=True)
|
'upstream.mustache', data, overwrite=True)
|
||||||
wo_nginx = open('{0}/upstream.conf'.format(ngxcnf),
|
|
||||||
encoding='utf-8', mode='w')
|
|
||||||
self.app.render(
|
|
||||||
(data), 'upstream.mustache', out=wo_nginx)
|
|
||||||
wo_nginx.close()
|
|
||||||
|
|
||||||
data = dict(phpconf=True if
|
data = dict(phpconf=True if
|
||||||
WOAptGet.is_installed(self, 'php7.2-fpm')
|
WOAptGet.is_installed(self, 'php7.2-fpm')
|
||||||
else False)
|
else False)
|
||||||
wo_nginx = open('{0}/stub_status.conf'.format(ngxcnf),
|
WOTemplate.tmpl_render(self,
|
||||||
encoding='utf-8', mode='w')
|
'{0}/stub_status.conf'.format(ngxcnf),
|
||||||
self.app.render(
|
'stub_status.mustache', data)
|
||||||
(data), 'stub_status.mustache', out=wo_nginx)
|
|
||||||
wo_nginx.close()
|
|
||||||
|
|
||||||
data = dict()
|
data = dict()
|
||||||
wo_nginx = open('{0}/webp.conf'.format(ngxcnf),
|
WOTemplate.tmpl_render(self,
|
||||||
encoding='utf-8', mode='w')
|
'{0}/webp.conf'.format(ngxcnf),
|
||||||
self.app.render((data), 'webp.mustache',
|
'webp.mustache', data)
|
||||||
out=wo_nginx)
|
|
||||||
wo_nginx.close()
|
|
||||||
|
|
||||||
wo_nginx = open('{0}/cloudflare.conf'.format(ngxcnf),
|
WOTemplate.tmpl_render(self,
|
||||||
encoding='utf-8', mode='w')
|
'{0}/cloudflare.conf'.format(ngxcnf),
|
||||||
self.app.render((data), 'cloudflare.mustache',
|
'cloudflare.mustache', data)
|
||||||
out=wo_nginx)
|
|
||||||
wo_nginx.close()
|
|
||||||
|
|
||||||
wo_nginx = open('{0}/'
|
wo_nginx = open('{0}/'
|
||||||
'map-wp-fastcgi-cache.conf'.format(ngxcnf),
|
'map-wp-fastcgi-cache.conf'.format(ngxcnf),
|
||||||
@@ -485,7 +473,7 @@ def post_pref(self, apt_packages, packages):
|
|||||||
.format(ngxroot))
|
.format(ngxroot))
|
||||||
|
|
||||||
if not os.path.isdir('{0}22222/conf/nginx'
|
if not os.path.isdir('{0}22222/conf/nginx'
|
||||||
.format(ngxroot)):
|
.format(ngxroot)):
|
||||||
Log.debug(self, "Creating directory "
|
Log.debug(self, "Creating directory "
|
||||||
"{0}22222/conf/nginx"
|
"{0}22222/conf/nginx"
|
||||||
.format(ngxroot))
|
.format(ngxroot))
|
||||||
|
|||||||
Reference in New Issue
Block a user