Add definition for restart_nginx used by callback

This commit is contained in:
Disassembler 2018-08-14 16:35:28 +02:00
parent 6532ed61e0
commit 1d718077f9
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 4 additions and 1 deletions

View File

@ -250,7 +250,7 @@ class AppMgr:
self.update_proxy_conf(app, tools.NULL_IP) self.update_proxy_conf(app, tools.NULL_IP)
# Restart nginx to properly bind the new listen port # Restart nginx to properly bind the new listen port
if restart_nginx: if restart_nginx:
tools.restart_service('nginx') tools.restart_nginx()
def rebuild_issue(self): def rebuild_issue(self):
# Compile the HTTPS host displayed in terminal banner # Compile the HTTPS host displayed in terminal banner

View File

@ -92,6 +92,9 @@ def restart_service(service):
def reload_nginx(): def reload_nginx():
subprocess.run(['/sbin/service', 'nginx', 'reload']) subprocess.run(['/sbin/service', 'nginx', 'reload'])
def restart_nginx():
restart_service('nginx')
def get_cert_info(): def get_cert_info():
data = ssl._ssl._test_decode_cert('/etc/ssl/certs/services.pem') 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']))) data['subject'] = dict(data['subject'][i][0] for i in range(len(data['subject'])))