/[monit]/monit/contrib/rc.monit
ViewVC logotype

Diff of /monit/contrib/rc.monit

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by hauk, Fri Aug 22 13:57:42 2003 UTC revision 1.7 by hauk, Sat Sep 6 00:46:54 2003 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2  #  #
3  # monit         Mnitor Unix systems  # monit         Monitor Unix systems
4  #  #
5  # Author:       Clinton Work,   <work@scripty.com>  # Author:       Clinton Work,   <work@scripty.com>
6  #  #
7  # chkconfig:    345 98 02  # chkconfig:    345 98 02
8  # description:  Monit is a system for monitoring processes running on a  # description:  Monit is a utility for managing and monitoring processes,
9  #               Unix system, and for monitoring files, directories and  #               files, directories and devices on a Unix system.
 #               devices.  
10  # processname:  monit  # processname:  monit
11  # pidfile:      /var/run/monit.pid  # pidfile:      /var/run/monit.pid
12  # config:       /etc/monitrc  # config:       /etc/monitrc
# Line 15  Line 14 
14  # Source function library.  # Source function library.
15  . /etc/init.d/functions  . /etc/init.d/functions
16    
17  [ -f /usr/bin/monit ] || exit 0  [ -f /usr/local/bin/monit ] || exit 0
18    
19  RETVAL=0  RETVAL=0
20    
# Line 23  RETVAL=0 Line 22  RETVAL=0
22  case "$1" in  case "$1" in
23    start)    start)
24          echo -n "Starting monit: "          echo -n "Starting monit: "
25          daemon /usr/bin/monit -c /etc/monitrc          daemon /usr/local/bin/monit -c /etc/monitrc
26          RETVAL=$?          RETVAL=$?
27    
28          echo          echo
# Line 31  case "$1" in Line 30  case "$1" in
30          ;;          ;;
31    stop)    stop)
32          echo -n "Stopping monit: "          echo -n "Stopping monit: "
33          daemon /usr/bin/monit -c /etc/monitrc quit          daemon /usr/local/bin/monit -c /etc/monitrc quit
34          RETVAL=$?          RETVAL=$?
35    
36          echo          echo
37          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/monit          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/monit
38          ;;          ;;
39    status)    status)
40          /usr/bin/monit -c /etc/monitrc status          /usr/local/bin/monit -c /etc/monitrc status
41          RETVAL=$?          RETVAL=$?
42          ;;          ;;
43    restart)    restart)
# Line 47  case "$1" in Line 46  case "$1" in
46          RETVAL=$?          RETVAL=$?
47          ;;          ;;
48    reload)    reload)
49          /usr/bin/monit -c /etc/monitrc reload          /usr/local/bin/monit -c /etc/monitrc reload
50          RETVAL=$?          RETVAL=$?
51          ;;          ;;
52    *)    *)

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26