Complete fix for #601
This commit is contained in:
@@ -19,14 +19,15 @@ class Nginx(base.Installer):
|
|||||||
"rpm": ["nginx"]
|
"rpm": ["nginx"]
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_template_context(self, app):
|
def get_template_context(self):
|
||||||
"""Additionnal variables."""
|
"""Additionnal variables."""
|
||||||
context = super().get_template_context()
|
context = super().get_template_context()
|
||||||
context.update({
|
context.update({
|
||||||
"app_instance_path": (
|
"app_instance_path": (
|
||||||
self.config.get(app, "instance_path")),
|
self.config.get("modoboa", "instance_path")),
|
||||||
"uwsgi_socket_path": (
|
"uwsgi_socket_path": (
|
||||||
Uwsgi(self.config, self.upgrade, self.restore).get_socket_path(app))
|
Uwsgi(self.config, self.upgrade, self.restore).get_socket_path("modoboa")
|
||||||
|
)
|
||||||
})
|
})
|
||||||
return context
|
return context
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ class Nginx(base.Installer):
|
|||||||
"""Custom app configuration."""
|
"""Custom app configuration."""
|
||||||
if hostname is None:
|
if hostname is None:
|
||||||
hostname = self.config.get("general", "hostname")
|
hostname = self.config.get("general", "hostname")
|
||||||
context = self.get_template_context(app)
|
context = self.get_template_context()
|
||||||
context.update({"hostname": hostname, "extra_config": extra_config})
|
context.update({"hostname": hostname, "extra_config": extra_config})
|
||||||
src = self.get_file_path("{}.conf.tpl".format(app))
|
src = self.get_file_path("{}.conf.tpl".format(app))
|
||||||
group = None
|
group = None
|
||||||
|
|||||||
Reference in New Issue
Block a user