summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-install
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2011-09-13 00:11:54 +0300
committerMartin Kosek <mkosek@redhat.com>2011-09-13 11:15:50 +0200
commitbbbb550aaa13eb2ebdb113ff8738ed5c8f5277aa (patch)
tree6bff89c2c7bddc46ae710b8587aac6164c22ad76 /install/tools/ipa-replica-install
parent45e379d5bf94170ccce16e6e2af8c5ccc55c826b (diff)
downloadfreeipa-bbbb550aaa13eb2ebdb113ff8738ed5c8f5277aa.tar.gz
freeipa-bbbb550aaa13eb2ebdb113ff8738ed5c8f5277aa.tar.xz
freeipa-bbbb550aaa13eb2ebdb113ff8738ed5c8f5277aa.zip
Convert installation tools to platform-independent access to system services
http://fedorahosted.org/freeipa/ticket/1605
Diffstat (limited to 'install/tools/ipa-replica-install')
-rwxr-xr-xinstall/tools/ipa-replica-install13
1 files changed, 7 insertions, 6 deletions
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 50c425624..9b7e64380 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -39,6 +39,7 @@ from ipapython import version
from ipalib import api, errors, util
from ipapython.config import IPAOptionParser
from ipapython import sysrestore
+from ipapython import services as ipaservices
CACERT="/etc/ipa/ca.crt"
REPLICA_INFO_TOP_DIR=None
@@ -258,7 +259,7 @@ def check_dirsrv():
sys.exit(1)
try:
- service.stop("dirsrv")
+ ipaservices.knownservices.dirsrv.stop()
except:
pass
@@ -441,7 +442,7 @@ def main():
if CA:
CA.import_ra_cert(dir + "/ra.p12")
CA.fix_ra_perms()
- service.restart("httpd")
+ ipaservices.knownservices.httpd.restart()
# The DS instance is created before the keytab, add the SSL cert we
# generated
@@ -451,9 +452,9 @@ def main():
service.print_msg("Applying LDAP updates")
ds.apply_updates()
- service.restart("dirsrv")
- service.restart("krb5kdc")
- service.restart("httpd")
+ ipaservices.knownservices.dirsrv.restart()
+ ipaservices.knownservices.krb5kdc.restart()
+ ipaservices.knownservices.httpd.restart()
if options.setup_dns:
install_bind(config, options)
@@ -470,7 +471,7 @@ def main():
ds.init_memberof()
#Everything installed properly, activate ipa service.
- service.chkconfig_on('ipa')
+ ipaservices.knownservices.ipa.enable()
try:
if not os.geteuid()==0: