diff --git a/basic/usr/local/bin/spotter-appmgr b/basic/usr/local/bin/spotter-appmgr index 165c6aa..0c6779b 100755 --- a/basic/usr/local/bin/spotter-appmgr +++ b/basic/usr/local/bin/spotter-appmgr @@ -123,16 +123,13 @@ class SpotterManager: def update_proxy(self, app): self.add_app_to_nginx(app) - self.reload_nginx() + subprocess.call(['service', 'nginx', 'reload']) def add_app_to_nginx(self, app): ip = get_container_ip(app) with open(os.path.join(NGINX_DIR, '{}.conf'.format(app)), 'w') as f: f.write(NGINX_TEMPLATE.format(app=app, ip=ip, domain=self.domain, port=self.port)) - def reload_nginx(self): - subprocess.call(['service', 'nginx', 'reload']) - def update_domain(self, domain, port): self.domain = self.conf["_"]["domain"] = domain self.port = self.conf["_"]["port"] = port @@ -140,7 +137,7 @@ class SpotterManager: self.update_app_confs() self.rebuild_nginx() self.rebuild_issue() - self.reload_nginx() + subprocess.call(['service', 'nginx', 'restart']) def update_app_confs(self): for app in self.conf.iteritems():