mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-06-27 16:57:01 +00:00
Fix issue with reload config.
This commit is contained in:
parent
2b8ec3ac88
commit
bf34bada92
@ -234,8 +234,7 @@ def restart_wireguard_interfaces(request):
|
|||||||
filtered_lines = []
|
filtered_lines = []
|
||||||
for line in lines:
|
for line in lines:
|
||||||
stripped_line = line.strip()
|
stripped_line = line.strip()
|
||||||
if stripped_line.startswith("Address") or stripped_line.startswith("ListenPort") \
|
if stripped_line.startswith("Address") or stripped_line.startswith("PostUp") or stripped_line.startswith("PostDown"):
|
||||||
or stripped_line.startswith("PostUp") or stripped_line.startswith("PostDown"):
|
|
||||||
continue
|
continue
|
||||||
filtered_lines.append(line)
|
filtered_lines.append(line)
|
||||||
|
|
||||||
@ -269,6 +268,7 @@ def restart_wireguard_interfaces(request):
|
|||||||
|
|
||||||
if interface_count > 0 and error_count == 0:
|
if interface_count > 0 and error_count == 0:
|
||||||
if mode == 'reload':
|
if mode == 'reload':
|
||||||
|
messages.warning(request, "WARNING|Please note that the interface was reloaded, not restarted. Double-check if the the peers are working as expected. If you find any issues, please report them.")
|
||||||
verbose_mode = 'reloaded'
|
verbose_mode = 'reloaded'
|
||||||
else:
|
else:
|
||||||
verbose_mode = 'restarted'
|
verbose_mode = 'restarted'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user