From f763b137ee1eee228f53b456b8245b1499185ef7 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Mon, 11 May 2015 14:04:29 +0200 Subject: DNSSEC: fix traceback during shutdown phase ipa-dnskeysyncd causes traceback when receive SIGTERM, SIGINT Ticket: https://fedorahosted.org/freeipa/ticket/4657 Reviewed-By: Petr Spacek --- daemons/dnssec/ipa-dnskeysyncd | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'daemons') diff --git a/daemons/dnssec/ipa-dnskeysyncd b/daemons/dnssec/ipa-dnskeysyncd index 398f00762..31027cb0c 100755 --- a/daemons/dnssec/ipa-dnskeysyncd +++ b/daemons/dnssec/ipa-dnskeysyncd @@ -22,6 +22,17 @@ from ipaplatform.paths import paths from ipapython.dnssec.keysyncer import KeySyncer +# IPA framework initialization +api.bootstrap(in_server=True, log=None) # no logging to file +api.finalize() +standard_logging_setup(verbose=True, debug=api.env.debug) +log = root_logger +#log.addHandler(systemd.journal.JournalHandler()) + +# Global state +watcher_running = True +ldap_connection = False + DAEMONNAME = 'ipa-dnskeysyncd' PRINCIPAL = None # not initialized yet WORKDIR = '/tmp' # private temp @@ -47,21 +58,10 @@ def commenceShutdown(signum, stack): os.umask(007) -# Global state -watcher_running = True -ldap_connection = False - # Signal handlers signal.signal(signal.SIGTERM, commenceShutdown) signal.signal(signal.SIGINT, commenceShutdown) -# IPA framework initialization -api.bootstrap(in_server=True, log=None) # no logging to file -api.finalize() -standard_logging_setup(verbose=True, debug=api.env.debug) -log = root_logger -#log.addHandler(systemd.journal.JournalHandler()) - # Kerberos initialization PRINCIPAL = str('%s/%s' % (DAEMONNAME, api.env.host)) log.debug('Kerberos principal: %s', PRINCIPAL) -- cgit