mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
a347c11650
All Python scripts are now generated from a template with a dynamic shebang. ipatests/i18n.py is no longer an executable script with shebang. The module is not executed as script directly, but rather as $(PYTHON) ipatests/i18n.py Fixes: https://pagure.io/freeipa/issue/7680 All Python scripts are now template files with a dynamic shebang line. Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
28 lines
657 B
Plaintext
28 lines
657 B
Plaintext
@PYTHONSHEBANG@
|
|
#
|
|
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
|
|
#
|
|
|
|
import syslog
|
|
import traceback
|
|
|
|
from ipaplatform import services
|
|
from ipaserver.install import certs
|
|
|
|
|
|
def main():
|
|
with certs.renewal_lock:
|
|
try:
|
|
if services.knownservices.krb5kdc.is_running():
|
|
syslog.syslog(syslog.LOG_NOTICE, 'restarting krb5kdc')
|
|
services.knownservices.krb5kdc.restart()
|
|
except Exception as e:
|
|
syslog.syslog(
|
|
syslog.LOG_ERR, "cannot restart krb5kdc: {}".format(e))
|
|
|
|
|
|
try:
|
|
main()
|
|
except Exception:
|
|
syslog.syslog(syslog.LOG_ERR, traceback.format_exc())
|