mirror of
https://github.com/towalink/wgfrontend.git
synced 2025-04-19 08:55:11 +00:00
Introduce on_change_command config attribute
This commit is contained in:
parent
7aca808caf
commit
31569ac124
@ -49,6 +49,10 @@ class Configuration():
|
|||||||
[general]
|
[general]
|
||||||
# The WireGuard config file to read and write
|
# The WireGuard config file to read and write
|
||||||
wg_configfile = {wg_configfile}
|
wg_configfile = {wg_configfile}
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
|
||||||
# The system user to be used for the frontend
|
# The system user to be used for the frontend
|
||||||
user = {user}
|
user = {user}
|
||||||
@ -102,6 +106,11 @@ class Configuration():
|
|||||||
"""The directory for the generated config files"""
|
"""The directory for the generated config files"""
|
||||||
return '/var/lib/wgfrontend'
|
return '/var/lib/wgfrontend'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def on_change_command(self):
|
||||||
|
"""The command to be executed on config changes"""
|
||||||
|
return self.config.get('on_change_command')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def user(self):
|
def user(self):
|
||||||
"""The configured name for the wgfrontend system user"""
|
"""The configured name for the wgfrontend system user"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user