mirror of
https://github.com/towalink/wgfrontend.git
synced 2025-04-19 08:55:11 +00:00
Change indentation and strip quotes in more controlled manner
This commit is contained in:
parent
c8dc8d1ffb
commit
94b2053585
@ -57,7 +57,7 @@ class Configuration():
|
||||
|
||||
# The command to be executed when the WireGuard config has changed
|
||||
# on_change_command =
|
||||
# Example: on_change_command = "sudo /etc/init.d/wgfrontend_interface restart"
|
||||
on_change_command = "sudo --non-interactive wg-quick down {wg_configfile}; sudo --non-interactive wg-quick up {wg_configfile}"
|
||||
|
||||
# The interface the web server shall bind to
|
||||
# socket_host = 0.0.0.0
|
||||
@ -130,7 +130,8 @@ class Configuration():
|
||||
"""The command to be executed on config changes"""
|
||||
cmd = self.config.get('on_change_command')
|
||||
if cmd is not None:
|
||||
cmd = cmd.strip('"\'')
|
||||
if cmd[0] in ['"', '\'']:
|
||||
cmd = cmd[1:-1]
|
||||
return cmd
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user