Pavel Loginov 2020-08-13 16:19:55 +02:00
parent eb7ff7902f
commit 5d70162568
2 changed files with 8 additions and 2 deletions

View File

@ -276,12 +276,18 @@ if form.getvalue('list_id_for_delete') is not None:
list_name = form.getvalue('list_name')
user_group = funct.get_user_group(id=1)
cmd = "sed -i 's!%s$!!' %s/%s/%s/%s && sed -i '/^$/d' %s/%s/%s/%s" % (ip, fullpath, lists_path, user_group, list_name, fullpath, lists_path, user_group, list_name)
cmd = "sed -i 's!%s$!!' %s/%s/%s/%s" % (ip, fullpath, lists_path, user_group, list_name)
cmd1 = "sed -i '/^$/d' %s/%s/%s/%s" % (fullpath, lists_path, user_group, list_name)
output, stderr = funct.subprocess_execute(cmd)
output1, stderr1 = funct.subprocess_execute(cmd1)
if output:
print('error: ' + str(output))
if stderr:
print('error: ' + str(stderr))
if output1:
print('error: ' + str(output1))
if stderr1:
print('error: ' + str(stderr1))
cmd='echo "del acl #%s #%s" |nc %s %s' % (list_id, ip_id, serv, haproxy_sock_port)

View File

@ -214,7 +214,7 @@
</table>
<div id="ajaxlist"></div>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
You can read how it works <a href="https://haproxy-wi.org/description.py?description=runtimeapi#ip" title="Change IP and Port" target="_blank">here</a>
You can read how it works <a href="https://haproxy-wi.org/description.py?description=runtimeapi#lists" title="Manage lists" target="_blank">here</a>
</div>
</div>
{% endif %}