summaryrefslogtreecommitdiffstats
path: root/daemons
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-05-11 14:04:29 +0200
committerPetr Vobornik <pvoborni@redhat.com>2015-06-15 09:43:51 +0200
commitf763b137ee1eee228f53b456b8245b1499185ef7 (patch)
treea3fa3873c1fa0708c04b872f4d9c3f35b0356083 /daemons
parentbb6c0b9c634f26ae5d16079b3a66841ac0ce60cc (diff)
downloadfreeipa-f763b137ee1eee228f53b456b8245b1499185ef7.tar.gz
freeipa-f763b137ee1eee228f53b456b8245b1499185ef7.tar.xz
freeipa-f763b137ee1eee228f53b456b8245b1499185ef7.zip
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 <pspacek@redhat.com>
Diffstat (limited to 'daemons')
-rwxr-xr-xdaemons/dnssec/ipa-dnskeysyncd22
1 files changed, 11 insertions, 11 deletions
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)