diff options
author | Simo Sorce <ssorce@redhat.com> | 2011-01-27 11:39:24 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-01-27 11:56:54 -0500 |
commit | 442d6ad30ce1156914e6245aa7502499e50ec0da (patch) | |
tree | b89494d3e5e02fa483436fc6c00f405637da2803 /ipa.init | |
parent | 740b689696debf0c066b6879ee865708dfcf1109 (diff) | |
download | freeipa-442d6ad30ce1156914e6245aa7502499e50ec0da.tar.gz freeipa-442d6ad30ce1156914e6245aa7502499e50ec0da.tar.xz freeipa-442d6ad30ce1156914e6245aa7502499e50ec0da.zip |
Fix ipa init script to not depend on dirsrv init internals
Fixes: https://fedorahosted.org/freeipa/ticket/857
Diffstat (limited to 'ipa.init')
-rwxr-xr-x | ipa.init | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -1,12 +1,10 @@ #!/bin/sh # -# ipa This starts and stops ipa +# ipa This starts and stops ipa controlled daemons # # chkconfig: - 21 79 # description: IPA Server -# processname: /usr/sbin/ns-slapd # configdir: /etc/ipa/ -# piddir: /var/run/dirsrv # # Source function library. @@ -25,19 +23,14 @@ then exit 0 fi -# Lockfile -if [ -d "/var/lock/subsys" ] ; then - lockfile="/var/lock/subsys/dirsrv" -else - lockfile="/var/lock/dirsrv/lock" -fi - case "$1" in start|stop|restart|status) /usr/sbin/ipactl $1 ;; condrestart) - [ ! -f $lockfile ] || /usr/sbin/ipactl restart + /sbin/service dirsrv status + RETVAL=$? + [ $RETVAL = 0 ] && /usr/sbin/ipactl restart ;; *) echo "Usage: $0 {start|stop|status|restart|condrestart}" |