summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/httpinstance.py
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2011-09-13 00:10:45 +0300
committerMartin Kosek <mkosek@redhat.com>2011-09-13 11:35:25 +0200
commit7059bd195e3901c52920205b1fd9b91a8b2a52ca (patch)
tree7c751cacb02a964587d18960578a2c840e78a0e1 /ipaserver/install/httpinstance.py
parentb73b0178971a0547ba72a9fdfaa85ad4cfa1cacf (diff)
downloadfreeipa-7059bd195e3901c52920205b1fd9b91a8b2a52ca.zip
freeipa-7059bd195e3901c52920205b1fd9b91a8b2a52ca.tar.gz
freeipa-7059bd195e3901c52920205b1fd9b91a8b2a52ca.tar.xz
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.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
index 4294bee..eae6075 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: