annotate wflogs-daemon.rc.in @ 11:1b7813f588ba stable-1-0-1

fix type in config file
author Carl Byington <carl@five-ten-sg.com>
date Fri, 17 May 2013 13:29:14 -0700
parents 0aa1171aebd2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 #!@BASH@
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2 #
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3 # wflogs-daemon This script controls the wflogs-daemon daemon.
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
4 #
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
5 #
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
6 # chkconfig: 2345 60 40
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
7 # description: wflogs-daemon monitors syslog files, feeds pieces to wflogs
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
8 # processname: wflogs-daemon
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
9 # pidfile: /var/run/wflogs-daemon.pid
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
10 # Source function library.
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
11 #
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
12 . /etc/rc.d/init.d/functions
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
13
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
14 # Source networking configuration.
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
15 . /etc/sysconfig/network
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
16
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17 RETVAL=0
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
18 # See how we were called.
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
19 case "$1" in
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
20 start)
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
21 # Start daemons.
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
22 echo -n "Starting wflogs-daemon: "
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
23 if [ ! -f /var/lock/subsys/wflogs-daemon ]; then
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
24 cd SYSCONFDIR # conf file is here
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
25 SBINDIR/wflogs-daemon -d 3
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
26 RETVAL=$?
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
27 pid=`pidof -s SBINDIR/wflogs-daemon`
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
28 if [ $pid ]
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
29 then
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
30 success "Starting wflogs-daemon :"
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
31 touch /var/lock/subsys/wflogs-daemon
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
32 echo
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
33 else
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
34 failure "Starting wflogs-daemon:"
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
35 echo
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
36 fi
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
37 else
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
38 echo -n "already running! "
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
39 failure "wflogs-daemon already running!"
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
40 echo
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
41 fi
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
42
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
43 ;;
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
44 stop)
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
45 # Stop daemons.
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
46 echo -n "Shutting down wflogs-daemon: "
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
47 killproc wflogs-daemon
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
48 RETVAL=$?
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
49 echo
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
50 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/wflogs-daemon
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
51 ;;
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
52 restart|reload)
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
53 $0 stop
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
54 $0 start
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
55 RETVAL=$?
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
56 ;;
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
57 status)
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
58 status wflogs-daemon
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59 RETVAL=$?
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
60 ;;
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
61 *)
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
62 echo "Usage: wflogs-daemon {start|stop|restart|reload|status}"
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
63 exit 1
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
64 esac
0aa1171aebd2 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
65 exit $RETVAL