diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2011-09-13 10:47:13 +0300 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-09-13 11:14:18 +0200 |
commit | a02e0514f60f8ce5716876717b77e8712cc38396 (patch) | |
tree | 4bd64a56e9a0093e859767a18b1eed6d73afb216 /ipaserver/install/httpinstance.py | |
parent | b996a41177df9e41426155d3445dc20b0657c9d5 (diff) | |
download | freeipa-a02e0514f60f8ce5716876717b77e8712cc38396.tar.gz freeipa-a02e0514f60f8ce5716876717b77e8712cc38396.tar.xz freeipa-a02e0514f60f8ce5716876717b77e8712cc38396.zip |
Convert server install code to platform-independent access to system services
https://fedorahosted.org/freeipa/ticket/1605
Diffstat (limited to 'ipaserver/install/httpinstance.py')
-rw-r--r-- | ipaserver/install/httpinstance.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py index 4294bee1b..eae60754a 100644 --- a/ipaserver/install/httpinstance.py +++ b/ipaserver/install/httpinstance.py @@ -30,6 +30,7 @@ import dsinstance import installutils from ipapython import sysrestore from ipapython import ipautil +from ipapython import services as ipaservices from ipalib import util, api HTTPD_DIR = "/etc/httpd" @@ -220,13 +221,13 @@ class HTTPInstance(service.Service): os.chown(certs.NSS_DIR + "/pwdfile.txt", 0, pent.pw_gid ) # Fix SELinux permissions on the database - ipautil.run(["/sbin/restorecon", certs.NSS_DIR + "/cert8.db"]) - ipautil.run(["/sbin/restorecon", certs.NSS_DIR + "/key3.db"]) + ipaservices.restore_context(certs.NSS_DIR + "/cert8.db") + ipaservices.restore_context(certs.NSS_DIR + "/key3.db") # In case this got generated as part of the install, reset the # context if ipautil.file_exists(certs.CA_SERIALNO): - ipautil.run(["/sbin/restorecon", certs.CA_SERIALNO]) + ipaservices.restore_context(certs.CA_SERIALNO) os.chown(certs.CA_SERIALNO, 0, pent.pw_gid) os.chmod(certs.CA_SERIALNO, 0664) @@ -272,7 +273,7 @@ class HTTPInstance(service.Service): db = certs.CertDB(api.env.realm) db.untrack_server_cert("Server-Cert") if not enabled is None and not enabled: - self.chkconfig_off() + self.disable() for f in ["/etc/httpd/conf.d/ipa.conf", SSL_CONF, NSS_CONF]: try: |