from .pidfile import PidFileError, InvalidPidFileError, PidFileInUseError, PidFile
-__version__ = '0.6.6'
+__version__ = '0.7.1'
LOG = logging.getLogger(__name__)
'217.66.53.86',
]
+ default_cmd_checkconf = '/usr/sbin/named-checkconf'
+ default_cmd_reload = '/usr/sbin/rndc reload'
+ default_cmd_status = '/usr/bin/systemctl status named.service'
+ default_cmd_start = '/usr/bin/systemctl start named.service'
+ default_cmd_restart = '/usr/bin/systemctl restart named.service'
+
re_split_addresses = re.compile(r'[,;\s]+')
re_integer = re.compile(r'^\s*(\d+)\s*$')
self.reload_necessary = False
self.restart_necessary = False
+ self.cmd_checkconf = self.default_cmd_checkconf
+ self.cmd_reload = self.default_cmd_reload
+ self.cmd_status = self.default_cmd_status
+ self.cmd_start = self.default_cmd_start
+ self.cmd_restart = self.default_cmd_restart
+
self.files2replace = {}
self.moved_files = {}
res['default_named_log_dir'] = self.default_named_log_dir
res['default_named_version2show'] = self.default_named_version2show
res['default_zone_masters'] = copy.copy(self.default_zone_masters)
+ res['default_cmd_checkconf'] = copy.copy(self.default_cmd_checkconf)
+ res['default_cmd_reload'] = copy.copy(self.default_cmd_reload)
+ res['default_cmd_start'] = copy.copy(self.default_cmd_start)
+ res['default_cmd_status'] = copy.copy(self.default_cmd_status)
+ res['default_cmd_restart'] = copy.copy(self.default_cmd_restart)
res['re_split_addresses'] = self.re_split_addresses
res['re_integer'] = self.re_integer
res['re_ipv4_zone'] = self.re_ipv4_zone
if 'masters' in section:
self._get_masters_from_cfg(section['masters'], section_name)
+ for item in ('cmd_checkconf', 'cmd_reload', 'cmd_status', 'cmd_start', 'cmd_restart'):
+ if item in section and section[item].strip():
+ setattr(self, item, section[item].strip())
+
# -------------------------------------------------------------------------
def _check_path_config(self, section, section_name, key, class_prop, absolute=True, desc=None):