diff options
author | Karl MacMillan <kmacmill@redhat.com> | 2007-12-12 11:19:42 -0500 |
---|---|---|
committer | Karl MacMillan <kmacmill@redhat.com> | 2007-12-12 11:19:42 -0500 |
commit | 1c3849eb576dc9d4cd3d4a39aff9da78be0ddcba (patch) | |
tree | 1d9ee1113e0e48e35d787af7ee42ea03145538ee /ipa-server/ipaserver/httpinstance.py | |
parent | 8792559f7440cac54072395a7677f31e9b029dc7 (diff) | |
download | freeipa.git-1c3849eb576dc9d4cd3d4a39aff9da78be0ddcba.tar.gz freeipa.git-1c3849eb576dc9d4cd3d4a39aff9da78be0ddcba.tar.xz freeipa.git-1c3849eb576dc9d4cd3d4a39aff9da78be0ddcba.zip |
User provided certs.
Diffstat (limited to 'ipa-server/ipaserver/httpinstance.py')
-rw-r--r-- | ipa-server/ipaserver/httpinstance.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/ipa-server/ipaserver/httpinstance.py b/ipa-server/ipaserver/httpinstance.py index 1799cca0..de0b3af8 100644 --- a/ipa-server/ipaserver/httpinstance.py +++ b/ipa-server/ipaserver/httpinstance.py @@ -29,6 +29,7 @@ import time import service import certs import dsinstance +import installutils from ipa.ipautil import * HTTPD_DIR = "/etc/httpd" @@ -43,21 +44,6 @@ successfully change with the command: Try updating the policycoreutils and selinux-policy packages. """ -def update_file(filename, orig, subst): - if os.path.exists(filename): - pattern = "%s" % re.escape(orig) - p = re.compile(pattern) - for line in fileinput.input(filename, inplace=1): - if not p.search(line): - sys.stdout.write(line) - else: - sys.stdout.write(p.sub(subst, line)) - fileinput.close() - return 0 - else: - print "File %s doesn't exist." % filename - return 1 - class HTTPInstance(service.Service): def __init__(self): service.Service.__init__(self, "httpd") @@ -145,7 +131,7 @@ class HTTPInstance(service.Service): def __set_mod_nss_port(self): self.step("Setting mod_nss port to 443") - if update_file(NSS_CONF, '8443', '443') != 0: + if installutils.update_file(NSS_CONF, '8443', '443') != 0: print "Updating %s failed." % NSS_CONF def __setup_ssl(self): |