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('.', '\\.')))