483b06
From 7b57dd770bbb4861f46805adaa9597445dff142c Mon Sep 17 00:00:00 2001
483b06
From: Stanislav Laznicka <slaznick@redhat.com>
483b06
Date: Thu, 16 Mar 2017 10:22:59 +0100
483b06
Subject: [PATCH] Backup ipa-specific httpd unit-file
483b06
483b06
On backup-restore, the ipa unit file for httpd was not backed up.
483b06
This file however contains setting for httpd to communicate with
483b06
gssproxy so not backing it up will result in httpd not knowing
483b06
how to get credentials.
483b06
483b06
https://pagure.io/freeipa/issue/6748
483b06
483b06
Reviewed-By: Martin Basti <mbasti@redhat.com>
483b06
Reviewed-By: Christian Heimes <cheimes@redhat.com>
483b06
---
483b06
 ipaserver/install/ipa_backup.py  | 1 +
483b06
 ipaserver/install/ipa_restore.py | 2 ++
483b06
 2 files changed, 3 insertions(+)
483b06
483b06
diff --git a/ipaserver/install/ipa_backup.py b/ipaserver/install/ipa_backup.py
483b06
index 07c50c8364c313b9aeb6d73540b541f55d98a44d..56583c01b1677a48c103d79123e3fbe106222f38 100644
483b06
--- a/ipaserver/install/ipa_backup.py
483b06
+++ b/ipaserver/install/ipa_backup.py
483b06
@@ -166,6 +166,7 @@ class Backup(admintool.AdminTool):
483b06
         paths.KDC_CERT,
483b06
         paths.KDC_KEY,
483b06
         paths.SYSTEMD_IPA_SERVICE,
483b06
+        paths.SYSTEMD_SYSTEM_HTTPD_IPA_CONF,
483b06
         paths.SYSTEMD_SSSD_SERVICE,
483b06
         paths.SYSTEMD_CERTMONGER_SERVICE,
483b06
         paths.SYSTEMD_PKI_TOMCAT_SERVICE,
483b06
diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py
483b06
index d798654ea7464f66e461936e41e3747a16acb21d..2552bbdef36f653f1c377ea096ca227d09e5f3e6 100644
483b06
--- a/ipaserver/install/ipa_restore.py
483b06
+++ b/ipaserver/install/ipa_restore.py
483b06
@@ -414,6 +414,8 @@ class Restore(admintool.AdminTool):
483b06
                 sssd = services.service('sssd', api)
483b06
                 sssd.restart()
483b06
                 http.remove_httpd_ccaches()
483b06
+                # have the daemons pick up their restored configs
483b06
+                run([paths.SYSTEMCTL, "--system", "daemon-reload"])
483b06
         finally:
483b06
             try:
483b06
                 os.chdir(cwd)
483b06
-- 
483b06
2.12.1
483b06