2010-12-04 14:42:14 -06:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2011-01-27 10:39:24 -06:00
|
|
|
# ipa This starts and stops ipa controlled daemons
|
2010-12-04 14:42:14 -06:00
|
|
|
#
|
|
|
|
# chkconfig: - 21 79
|
|
|
|
# description: IPA Server
|
|
|
|
# configdir: /etc/ipa/
|
|
|
|
#
|
|
|
|
|
2011-02-15 15:50:27 -06:00
|
|
|
export SYSTEMCTL_SKIP_REDIRECT=1
|
|
|
|
|
2010-12-04 14:42:14 -06:00
|
|
|
# Source function library.
|
|
|
|
if [ -f /etc/rc.d/init.d/functions ] ; then
|
|
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
fi
|
|
|
|
# Source networking configuration.
|
|
|
|
if [ -f /etc/sysconfig/network ] ; then
|
|
|
|
. /etc/sysconfig/network
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check that networking is up.
|
|
|
|
if [ "${NETWORKING}" = "no" ]
|
|
|
|
then
|
|
|
|
echo "Networking is down"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start|stop|restart|status)
|
|
|
|
/usr/sbin/ipactl $1
|
|
|
|
;;
|
|
|
|
condrestart)
|
2011-01-27 10:39:24 -06:00
|
|
|
/sbin/service dirsrv status
|
|
|
|
RETVAL=$?
|
|
|
|
[ $RETVAL = 0 ] && /usr/sbin/ipactl restart
|
2010-12-04 14:42:14 -06:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|status|restart|condrestart}"
|
|
|
|
exit 2
|
|
|
|
esac
|