From 30db59229ef4e90507789fda6ce965b768beb54e Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Fri, 3 Jul 2020 11:49:57 +0200 Subject: [PATCH] v4.3.3.0 Changelog: https://haproxy-wi.org/changelog.py#4_3_3 --- app/funct.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/funct.py b/app/funct.py index c62cd0ea..2ee68c90 100644 --- a/app/funct.py +++ b/app/funct.py @@ -666,13 +666,13 @@ def upload_and_restart(serv, cfg, **kwargs): commands[0] += open_port_firewalld(cfg, serv=serv, service='nginx') else: if kwargs.get("just_save") == "test": - commands = [ "sudo haproxy -q -c -f " + tmp_file + "&& sudo rm -f " + tmp_file ] + commands = [ "sudo haproxy -q -c -f " + tmp_file + " && sudo rm -f " + tmp_file ] elif kwargs.get("just_save") == "save": - commands = [ "sudo haproxy -q -c -f " + tmp_file + "&& sudo mv -f " + tmp_file + " " + config_path ] + commands = [ "sudo haproxy -q -c -f " + tmp_file + " && sudo mv -f " + tmp_file + " " + config_path ] elif kwargs.get("just_save") == "reload": - commands = [ "sudo haproxy -q -c -f " + tmp_file + "&& sudo mv -f " + tmp_file + " " + config_path + " && sudo systemctl reload haproxy" ] + commands = [ "sudo haproxy -q -c -f " + tmp_file + " && sudo mv -f " + tmp_file + " " + config_path + " && sudo systemctl reload haproxy" ] else: - commands = [ "sudo haproxy -q -c -f " + tmp_file + "&& sudo mv -f " + tmp_file + " " + config_path + " && sudo systemctl restart haproxy" ] + commands = [ "sudo haproxy -q -c -f " + tmp_file + " && sudo mv -f " + tmp_file + " " + config_path + " && sudo systemctl restart haproxy" ] if sql.get_setting('firewall_enable') == "1": commands[0] += open_port_firewalld(cfg, serv=serv) error += str(upload(serv, tmp_file, cfg, dir='fullpath')) @@ -1084,5 +1084,3 @@ def check_group(group, role_id): def check_service(serv, service_name): commands = [ "systemctl status "+service_name+" |grep Active |awk '{print $1}'" ] return ssh_command(serv, commands) - -