Change initialization order for logsys logging to files to work properly.
[openais.git] / init / redhat
bloba85602d056e49d2e541530f9bd852948b00f1c84
1 #!/bin/sh
3 # OpenAIS daemon init script for Red Hat Linux and compatibles.
5 # chkconfig: - 20 20
6 # processname: aisexec
7 # pidfile: /var/run/aisexec.pid
8 # description: OpenAIS daemon
10 # Source function library
11 . /etc/rc.d/init.d/functions
13 prog="aisexec"
14 exec="/usr/sbin/$prog"
15 lockfile="/var/lock/subsys/$prog"
17 [ -x "$exec" ] || exit 0
19 start() {
20 echo -n $"Starting OpenAIS daemon ($prog): "
21 daemon $exec
22 retval=$?
23 [ "$retval" -eq 0 ] && touch "$lockfile"
24 echo
25 return $retval
28 stop() {
29 echo -n $"Stopping OpenAIS daemon ($prog): "
30 killproc $prog
31 retval=$?
32 [ "$retval" -eq 0 ] && rm -f "$lockfile"
33 echo
34 return $retval
37 restart() {
38 stop
39 start
42 case "$1" in
43 start|stop|restart)
46 reload|force-reload)
47 restart
49 condrestart|try-restart)
50 [ ! -f "$lockfile" ] || restart
52 status)
53 status $prog
56 echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|status}"
57 exit 2
58 esac