"Fossies" - the Fresh Open Source Software Archive

Member "timbersee-0.8.3/docs/timbersee.sysvinit" (19 Jun 2002, 1439 Bytes) of package /linux/privat/old/timbersee-0.8.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 #
    3 # timbersee     This shell script takes care of starting and stopping
    4 #               timbersee.
    5 #
    6 # chkconfig: 2345 90 20
    7 # description: Timbersee is a log monitoring program that allows you \
    8 #              to take actions based on matching regular expressions.
    9 # processname: timbersee
   10 # config: /etc/timbersee.config
   11 # pidfile: /var/run/timbersee.pid
   12 
   13 # Source function library.
   14 . /etc/init.d/functions
   15 
   16 # Source networking configuration.
   17 . /etc/sysconfig/network
   18 
   19 # Source timbersee configureation.
   20 if [ -f /etc/sysconfig/timbersee ] ; then
   21     . /etc/sysconfig/timbersee
   22 fi
   23 
   24 # Check that networking is up.
   25 [ ${NETWORKING} = "no" ] && exit 0
   26 
   27 [ -f /usr/bin/timbersee ] || exit 0
   28 
   29 RETVAL=0
   30 prog="timbersee"
   31 
   32 start() {
   33     # Start daemons.
   34 
   35     echo -n $"Starting $prog: "
   36     daemon /usr/bin/timbersee --daemon
   37     RETVAL=$?
   38     echo
   39     [ $RETVAL -eq 0 ] && touch /var/lock/subsys/timbersee
   40     return $RETVAL
   41 }
   42 
   43 stop() {
   44     # Stop daemons.
   45     echo -n $"Shutting down $prog: "
   46     killproc timbersee
   47     RETVAL=$?
   48     echo
   49     [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/timbersee
   50     return $RETVAL
   51 }
   52 
   53 # See how we were called.
   54 case "$1" in
   55   start)
   56     start
   57     ;;
   58   stop)
   59     stop
   60     ;;
   61   restart|reload)
   62     stop
   63     start
   64     RETVAL=$?
   65     ;;
   66   condrestart)
   67     if [ -f /var/lock/subsys/timbersee ]; then
   68         stop
   69         start
   70         RETVAL=$?
   71     fi
   72     ;;
   73   status)
   74     status timbersee
   75     RETVAL=$?
   76     ;;
   77   *)
   78     echo $"Usage: $0 {start|stop|restart|condrestart|status}"
   79     exit 1
   80 esac
   81 
   82 exit $RETVAL