From decc302c1285cb59d6161318bc75c36fac67e5d7 Mon Sep 17 00:00:00 2001 From: pjclock <64903663+pjclock@users.noreply.github.com> Date: Fri, 8 May 2020 15:26:47 +0300 Subject: [PATCH] server's state saving fix Current save_command trying to write socket file into state file (not stdout) and it can't be passed over ssh as list. --- app/options.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/options.py b/app/options.py index c0cca24c..6f00bec9 100644 --- a/app/options.py +++ b/app/options.py @@ -603,8 +603,8 @@ if form.getvalue('servaction') is not None: cmd='echo "%s %s" |sudo socat stdio %s | cut -d "," -f 1-2,5-10,18,34-36 | column -s, -t' % (enable, backend, haproxy_sock) if form.getvalue('save') == "on": - save_command = 'echo "show servers state" | sudo socat stdio %s > %s' % (haproxy_sock, server_state_file) - command = [ cmd, save_command ] + save_command = 'echo "show servers state" | sudo socat %s stdio > %s' % (haproxy_sock, server_state_file) + command = [ cmd + ';' + save_command ] else: command = [ cmd ] @@ -1628,4 +1628,4 @@ if form.getvalue('updatesettings') is not None: val = form.getvalue('val') if sql.update_setting(settings, val): funct.logging('value '+val, ' changed settings '+settings, haproxywi=1, login=1) - print("Ok") \ No newline at end of file + print("Ok")