This commit is contained in:
brent s. 2020-05-18 06:06:50 -04:00
parent bdcbc09dc7
commit a992fac902
Signed by: bts
GPG Key ID: 8C004C2F93481F6B

View File

@ -12,7 +12,6 @@ logger = logging.getLogger()
class RA(object):
def __init__(self, conf = None, tpl_name = None, tpl_dir = None, *args, **kwargs):
self.conf = RAConf(conf = conf, tpl_name = tpl_name, tpl_dir = tpl_dir, *args, **kwargs)
self.svc = RASvc()


class RAConf(object):
@ -48,7 +47,6 @@ class RAConf(object):


class RASvc(object):
name = None
is_systemd = False
cmd_tpl = None
has_pkill = False
@ -56,7 +54,8 @@ class RASvc(object):
stop_cmd = None
restart_cmd = None

def __init__(self):
def __init__(self, name):
self.name = name
self._get_manager()

def _exec(self, cmd):
@ -142,6 +141,7 @@ class RADVD(RA):
if not tpl_name:
tpl_name = self.tpl_name
super().__init__(conf = conf, tpl_name = tpl_name, tpl_dir = tpl_dir)
self.svc = RASvc(self.name)
self.conf.ext_init()


@ -156,4 +156,5 @@ class DNSMasq(RA):
if not tpl_name:
tpl_name = self.tpl_name
super().__init__(conf = conf, tpl_name = tpl_name, tpl_dir = tpl_dir)
self.svc = RASvc(self.name)
self.conf.ext_init()