summaryrefslogtreecommitdiffstats
path: root/ipa.init
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-01-27 11:39:24 -0500
committerRob Crittenden <rcritten@redhat.com>2011-01-27 11:56:54 -0500
commit442d6ad30ce1156914e6245aa7502499e50ec0da (patch)
treeb89494d3e5e02fa483436fc6c00f405637da2803 /ipa.init
parent740b689696debf0c066b6879ee865708dfcf1109 (diff)
downloadfreeipa-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-xipa.init15
1 files changed, 4 insertions, 11 deletions
diff --git a/ipa.init b/ipa.init
index 92c9f4918..b5a43c319 100755
--- a/ipa.init
+++ b/ipa.init
@@ -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}"