mirror_corosync/init/redhat
Steven Dake 332c856135 defect 1099
move "ais" init script to mvlcge
add redhat init script from Bjorn


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@927 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-02-21 07:46:14 +00:00

59 lines
1.1 KiB
Bash

#!/bin/sh
#
# OpenAIS daemon init script for Red Hat Linux and compatibles.
#
# chkconfig: 2345 20 20
# processname: aisexec
# pidfile: /var/run/aisexec.pid
# description: OpenAIS daemon
# Source function library
. /etc/rc.d/init.d/functions
prog="aisexec"
exec="/usr/sbin/$prog"
lockfile="/var/lock/subsys/$prog"
[ -x "$exec" ] || exit 0
start() {
echo -n $"Starting OpenAIS daemon ($prog): "
daemon $exec
retval=$?
[ "$retval" -eq 0 ] && touch "$lockfile"
echo
return $retval
}
stop() {
echo -n $"Stopping OpenAIS daemon ($prog): "
killproc $prog
retval=$?
[ "$retval" -eq 0 ] && rm -f "$lockfile"
echo
return $retval
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
$1
;;
reload|force-reload)
restart
;;
condrestart|try-restart)
[ ! -f "$lockfile" ] || restart
;;
status)
status $prog
;;
*)
echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|status}"
exit 2
esac