diff --git a/basic/srv/spotter/appmgr/__init__.py b/basic/srv/spotter/appmgr/__init__.py index 97d33aa..e1c8269 100644 --- a/basic/srv/spotter/appmgr/__init__.py +++ b/basic/srv/spotter/appmgr/__init__.py @@ -250,7 +250,7 @@ class AppMgr: self.update_proxy_conf(app, tools.NULL_IP) # Restart nginx to properly bind the new listen port if restart_nginx: - tools.restart_service('nginx') + tools.restart_nginx() def rebuild_issue(self): # Compile the HTTPS host displayed in terminal banner diff --git a/basic/srv/spotter/appmgr/tools.py b/basic/srv/spotter/appmgr/tools.py index 03651d7..a9c53b5 100644 --- a/basic/srv/spotter/appmgr/tools.py +++ b/basic/srv/spotter/appmgr/tools.py @@ -92,6 +92,9 @@ def restart_service(service): def reload_nginx(): subprocess.run(['/sbin/service', 'nginx', 'reload']) +def restart_nginx(): + restart_service('nginx') + def get_cert_info(): data = ssl._ssl._test_decode_cert('/etc/ssl/certs/services.pem') data['subject'] = dict(data['subject'][i][0] for i in range(len(data['subject'])))