Pavel Loginov 3 years ago
parent 01d74ac0d4
commit b05828536a

@ -930,7 +930,7 @@ def upload_and_restart(server_ip, cfg, **kwargs):
if haproxy_enterprise == '1': if haproxy_enterprise == '1':
haproxy_service_name = "hapee-2.0-lb" haproxy_service_name = "hapee-2.0-lb"
check_config = "sudo " + haproxy_service_name + " haproxy -q -c -f " + tmp_file check_config = "sudo " + haproxy_service_name + " -q -c -f " + tmp_file
move_config = " && sudo mv -f " + tmp_file + " " + config_path move_config = " && sudo mv -f " + tmp_file + " " + config_path
if action == "test": if action == "test":

@ -7,6 +7,7 @@ env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('metrics.html') template = env.get_template('metrics.html')
form = funct.form form = funct.form
service = form.getvalue('service') service = form.getvalue('service')
title = 'Metrics service'
funct.check_login() funct.check_login()
print('Content-type: text/html\n') print('Content-type: text/html\n')
@ -23,7 +24,6 @@ try:
if not stderr: if not stderr:
if service_ver[0] == '* is not installed' or service_ver == '': if service_ver[0] == '* is not installed' or service_ver == '':
servers = '' servers = ''
title = 'Metrics service'
else: else:
if service == 'nginx': if service == 'nginx':
if funct.check_login(service=2): if funct.check_login(service=2):

Loading…
Cancel
Save