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