summaryrefslogtreecommitdiffstats
path: root/install/restart_scripts
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-11-28 16:24:33 +0100
committerJan Cholasta <jcholast@redhat.com>2016-12-02 09:14:35 +0100
commit1e6a204b4372bbbfb722a00370a5ce4e34406b9f (patch)
treeb8deef8cc3b4f04990f5d305eafdeff14d5d8928 /install/restart_scripts
parent98f0077360884da6df31b351caaed7510dec94de (diff)
downloadfreeipa-1e6a204b4372bbbfb722a00370a5ce4e34406b9f.tar.gz
freeipa-1e6a204b4372bbbfb722a00370a5ce4e34406b9f.tar.xz
freeipa-1e6a204b4372bbbfb722a00370a5ce4e34406b9f.zip
Set explicit confdir option for global contexts
Some API contexts are used to modify global state (e.g. files in /etc and /var). These contexts do not support confdir overrides. Initialize the API with an explicit confdir argument to paths.ETC_IPA. The special contexts are: * backup * cli_installer * installer * ipctl * renew * restore * server * updates The patch also corrects the context of the ipa-httpd-kdcproxy script to 'server'. https://fedorahosted.org/freeipa/ticket/6389 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'install/restart_scripts')
-rw-r--r--install/restart_scripts/renew_ca_cert2
-rw-r--r--install/restart_scripts/renew_ra_cert2
-rw-r--r--install/restart_scripts/restart_dirsrv3
-rw-r--r--install/restart_scripts/stop_pkicad3
4 files changed, 6 insertions, 4 deletions
diff --git a/install/restart_scripts/renew_ca_cert b/install/restart_scripts/renew_ca_cert
index 46e4242a4..bbeae1ae1 100644
--- a/install/restart_scripts/renew_ca_cert
+++ b/install/restart_scripts/renew_ca_cert
@@ -40,7 +40,7 @@ from ipaplatform.paths import paths
def _main():
nickname = sys.argv[1]
- api.bootstrap(in_server=True, context='restart')
+ api.bootstrap(in_server=True, context='restart', confdir=paths.ETC_IPA)
api.finalize()
api.Backend.ldap2.connect()
diff --git a/install/restart_scripts/renew_ra_cert b/install/restart_scripts/renew_ra_cert
index eb11c81a8..d978f946c 100644
--- a/install/restart_scripts/renew_ra_cert
+++ b/install/restart_scripts/renew_ra_cert
@@ -36,7 +36,7 @@ from ipaplatform.paths import paths
def _main():
nickname = 'ipaCert'
- api.bootstrap(in_server=True, context='restart')
+ api.bootstrap(in_server=True, context='restart', confdir=paths.ETC_IPA)
api.finalize()
api.Backend.ldap2.connect()
diff --git a/install/restart_scripts/restart_dirsrv b/install/restart_scripts/restart_dirsrv
index 72d3c544b..b4c9490c1 100644
--- a/install/restart_scripts/restart_dirsrv
+++ b/install/restart_scripts/restart_dirsrv
@@ -24,6 +24,7 @@ import syslog
import traceback
from ipalib import api
from ipaplatform import services
+from ipaplatform.paths import paths
from ipaserver.install import certs
@@ -33,7 +34,7 @@ def _main():
except IndexError:
instance = ""
- api.bootstrap(in_server=True, context='restart')
+ api.bootstrap(in_server=True, context='restart', confdir=paths.ETC_IPA)
api.finalize()
syslog.syslog(syslog.LOG_NOTICE, "certmonger restarted dirsrv instance '%s'" % instance)
diff --git a/install/restart_scripts/stop_pkicad b/install/restart_scripts/stop_pkicad
index ae07dcd58..133a4ef8f 100644
--- a/install/restart_scripts/stop_pkicad
+++ b/install/restart_scripts/stop_pkicad
@@ -23,11 +23,12 @@ import syslog
import traceback
from ipalib import api
from ipaplatform import services
+from ipaplatform.paths import paths
from ipaserver.install import certs
def main():
- api.bootstrap(in_server=True, context='restart')
+ api.bootstrap(in_server=True, context='restart', confdir=paths.ETC_IPA)
api.finalize()
dogtag_service = services.knownservices['pki_tomcatd']