updates naming for built in config services, broke out current example script to examples dir, broke out config service manager to separate file
This commit is contained in:
parent
433327c0ae
commit
dbc77d81f6
7 changed files with 180 additions and 91 deletions
19
daemon/core/configservices/sercurityservices/services.py
Normal file
19
daemon/core/configservices/sercurityservices/services.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from core.configservice.base import ConfigService, ConfigServiceMode
|
||||
|
||||
GROUP_NAME = "Security"
|
||||
|
||||
|
||||
class VpnClient(ConfigService):
|
||||
name = "VPNClient"
|
||||
group = GROUP_NAME
|
||||
directories = []
|
||||
executables = ["openvpn", "ip", "killall"]
|
||||
dependencies = []
|
||||
startup = ["sh vpnclient.sh"]
|
||||
validate = ["pidof openvpn"]
|
||||
shutdown = ["killall openvpn"]
|
||||
validation_mode = ConfigServiceMode.BLOCKING
|
||||
default_configs = []
|
||||
|
||||
def create_files(self):
|
||||
self.render("vpnclient.sh")
|
Loading…
Add table
Add a link
Reference in a new issue