mirror of https://github.com/Aidaho12/haproxy-wi
commit
4e7b99cb80
|
@ -609,7 +609,7 @@ if form.getvalue('master'):
|
||||||
output, error = funct.subprocess_execute(commands[0])
|
output, error = funct.subprocess_execute(commands[0])
|
||||||
|
|
||||||
if error:
|
if error:
|
||||||
logging('localhost', error, haproxywi=1)
|
funct.logging('localhost', error, haproxywi=1)
|
||||||
print('error: '+error)
|
print('error: '+error)
|
||||||
else:
|
else:
|
||||||
for l in output:
|
for l in output:
|
||||||
|
@ -634,7 +634,7 @@ if form.getvalue('master'):
|
||||||
output, error = funct.subprocess_execute(commands[0])
|
output, error = funct.subprocess_execute(commands[0])
|
||||||
|
|
||||||
if error:
|
if error:
|
||||||
logging('localhost', error, haproxywi=1)
|
funct.logging('localhost', error, haproxywi=1)
|
||||||
print('error: '+error)
|
print('error: '+error)
|
||||||
else:
|
else:
|
||||||
for l in output:
|
for l in output:
|
||||||
|
@ -681,7 +681,7 @@ if form.getvalue('masteradd'):
|
||||||
output, error = funct.subprocess_execute(commands[0])
|
output, error = funct.subprocess_execute(commands[0])
|
||||||
|
|
||||||
if error:
|
if error:
|
||||||
logging('localhost', error, haproxywi=1)
|
funct.logging('localhost', error, haproxywi=1)
|
||||||
print('error: '+error)
|
print('error: '+error)
|
||||||
else:
|
else:
|
||||||
for l in output:
|
for l in output:
|
||||||
|
@ -707,7 +707,7 @@ if form.getvalue('masteradd'):
|
||||||
output, error = funct.subprocess_execute(commands[0])
|
output, error = funct.subprocess_execute(commands[0])
|
||||||
|
|
||||||
if error:
|
if error:
|
||||||
logging('localhost', error, haproxywi=1)
|
funct.logging('localhost', error, haproxywi=1)
|
||||||
print('error: '+error)
|
print('error: '+error)
|
||||||
else:
|
else:
|
||||||
for l in output:
|
for l in output:
|
||||||
|
@ -902,4 +902,4 @@ if form.getvalue('change_waf_mode'):
|
||||||
haproxy_dir = sql.get_setting('haproxy_dir')
|
haproxy_dir = sql.get_setting('haproxy_dir')
|
||||||
serv = sql.select_server_by_name(server_hostname)
|
serv = sql.select_server_by_name(server_hostname)
|
||||||
commands = [ "sudo sed -i 's/^SecRuleEngine.*/SecRuleEngine %s/' %s/waf/modsecurity.conf " % (waf_mode, haproxy_dir) ]
|
commands = [ "sudo sed -i 's/^SecRuleEngine.*/SecRuleEngine %s/' %s/waf/modsecurity.conf " % (waf_mode, haproxy_dir) ]
|
||||||
funct.ssh_command(serv, commands)
|
funct.ssh_command(serv, commands)
|
||||||
|
|
Loading…
Reference in New Issue