summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install/ipa-server-install
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server/ipa-install/ipa-server-install')
-rw-r--r--ipa-server/ipa-install/ipa-server-install53
1 files changed, 32 insertions, 21 deletions
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install
index fd2071ad..0c208018 100644
--- a/ipa-server/ipa-install/ipa-server-install
+++ b/ipa-server/ipa-install/ipa-server-install
@@ -34,6 +34,7 @@ import socket
import logging
import pwd
import getpass
+import subprocess
import signal
import shutil
import glob
@@ -430,36 +431,46 @@ def main():
ds.restart()
krb.restart()
- # Allow apache to connect to the turbogears web gui
try:
- run(["/usr/sbin/setsebool", "-P", "httpd_can_network_connect", "true"])
- except:
- # SELinux may be disabled
- pass
+ selinux=0
+ try:
+ if (os.path.exists('/usr/sbin/selinuxenabled')):
+ run(["/usr/sbin/selinuxenabled"])
+ selinux=1
+ except subprocess.CalledProcessError, e:
+ # selinuxenabled returns 1 if not enabled
+ pass
+
+ if selinux:
+ # Allow apache to connect to the turbogears web gui
+ run(["/usr/sbin/setsebool", "-P", "httpd_can_network_connect", "true"])
- # Start the web gui
- run(["/sbin/service", "ipa-webgui", "start"])
+ # Start the web gui
+ run(["/sbin/service", "ipa-webgui", "start"])
- # Set the web gui to start on boot
- run(["/sbin/chkconfig", "ipa-webgui", "on"])
+ # Set the web gui to start on boot
+ run(["/sbin/chkconfig", "ipa-webgui", "on"])
- # Restart apache
- run(["/sbin/service", "httpd", "restart"])
+ # Restart apache
+ run(["/sbin/service", "httpd", "restart"])
- # Set apache to start on boot
- run(["/sbin/chkconfig", "httpd", "on"])
+ # Set apache to start on boot
+ run(["/sbin/chkconfig", "httpd", "on"])
- # Set fedora-ds to start on boot
- run(["/sbin/chkconfig", "dirsrv", "on"])
+ # Set fedora-ds to start on boot
+ run(["/sbin/chkconfig", "dirsrv", "on"])
- # Set the KDC to start on boot
- run(["/sbin/chkconfig", "krb5kdc", "on"])
+ # Set the KDC to start on boot
+ run(["/sbin/chkconfig", "krb5kdc", "on"])
- # Set the Kpasswd to start on boot
- run(["/sbin/chkconfig", "ipa-kpasswd", "on"])
+ # Set the Kpasswd to start on boot
+ run(["/sbin/chkconfig", "ipa-kpasswd", "on"])
- # Start Kpasswd
- run(["/sbin/service", "ipa-kpasswd", "start"])
+ # Start Kpasswd
+ run(["/sbin/service", "ipa-kpasswd", "start"])
+ except subprocess.CalledProcessError, e:
+ print "Installation failed:", e
+ return 1
# Set the admin user kerberos password
ds.change_admin_password(admin_password)