mirror of
https://github.com/KevinMidboe/mktxp-no-cli.git
synced 2025-10-29 17:50:23 +00:00
custom config files directory
This commit is contained in:
@@ -186,12 +186,27 @@ class LinuxConfig(OSConfig):
|
||||
@property
|
||||
def mktxp_user_dir_path(self):
|
||||
return FSHelper.full_path('~/mktxp')
|
||||
# return FSHelper.full_path('/etc/mktxp')
|
||||
|
||||
|
||||
class CustomConfig(OSConfig):
|
||||
''' Custom config
|
||||
'''
|
||||
def __init__(self, path):
|
||||
self._user_dir_path = path
|
||||
|
||||
@property
|
||||
def mktxp_user_dir_path(self):
|
||||
return FSHelper.full_path(self._user_dir_path)
|
||||
|
||||
|
||||
class MKTXPConfigHandler:
|
||||
# two-phase init
|
||||
def __init__(self):
|
||||
self.os_config = OSConfig.os_config()
|
||||
pass
|
||||
|
||||
# two-phase init, to enable custom config
|
||||
def __call__(self, os_config = None):
|
||||
self.os_config = os_config if os_config else OSConfig.os_config()
|
||||
if not self.os_config:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
@@ -35,8 +35,9 @@
|
||||
ipv6_firewall = False # IPv6 Firewall rules traffic metrics
|
||||
ipv6_neighbor = False # Reachable IPv6 Neighbors
|
||||
|
||||
monitor = True # Interface monitor metrics
|
||||
poe = True # POE metrics
|
||||
monitor = True # Interface monitor metrics
|
||||
netwatch = True # Netwatch metrics
|
||||
public_ip = True # Public IP metrics
|
||||
route = True # Routes metrics
|
||||
wireless = True # WLAN general metrics
|
||||
|
||||
Reference in New Issue
Block a user