From ebd24befaf7f1edbcf536fdbd3c64a267e7637c7 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 4 Jun 2019 08:42:41 +0200 Subject: [PATCH] Merge rebuild_nginx into update_host --- usr/lib/python3.6/vmmgr/vmmgr.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/usr/lib/python3.6/vmmgr/vmmgr.py b/usr/lib/python3.6/vmmgr/vmmgr.py index 9165913..7176d02 100644 --- a/usr/lib/python3.6/vmmgr/vmmgr.py +++ b/usr/lib/python3.6/vmmgr/vmmgr.py @@ -55,14 +55,10 @@ class VMMgr: self.reload_nginx() def update_host(self, domain, port): - # Update domain and port and rebuild all configuration. Web interface calls restart_nginx() in WSGI close handler + # Update domain and port, rebuild all configuration and restart nginx self.domain = self.conf['host']['domain'] = domain self.port = self.conf['host']['port'] = port self.conf.save() - # Rebuild and restart nginx if it was requested. - self.rebuild_nginx() - - def rebuild_nginx(self): # Rebuild nginx config for the portal app. Web interface calls restart_nginx() in WSGI close handler with open(os.path.join(NGINX_DIR, 'default.conf'), 'w') as f: f.write(templates.NGINX_DEFAULT.format(port=self.port, domain_esc=self.domain.replace('.', '\\.')))