"Fossies" - the Fresh Open Source Software Archive

Member "spammilt-0.5.0-rc7/SuSe/spammiltd.init" (12 Jun 2005, 1224 Bytes) of package /linux/privat/old/spammilt-0.5.0-rc7.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. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 #
    3 # spammiltd         This shell script takes care of starting and stopping
    4 #           spammiltd
    5 #
    6 # description: spammiltd provides spam filtering through the milter API of 
    7 #              sendmail.
    8 #
    9 ### BEGIN INIT INFO
   10 # Provides:       spammiltd
   11 # Required-Start: $local_fs $network
   12 # Required-Stop:  
   13 # Default-Start:  3 5
   14 # Default-Stop:
   15 # Description:   Starting spammiltd
   16 
   17 
   18 # Source function library.
   19 . /etc/rc.status
   20 
   21 . /etc/sysconfig/spammiltd
   22 
   23 [ -f /usr/sbin/spammiltd ] || exit 0
   24 [ -f /etc/mail/spam/black.list ] || exit 0
   25 [ -f /etc/mail/spam/white.list ] || exit 0
   26 [ -f /etc/mail/spam/dnsbl-ignore.list ] || exit 0
   27 
   28 RETVAL=0
   29 prog="spammiltd"
   30 
   31 rc_reset
   32 
   33 # See how we were called.
   34 case "$1" in
   35   start)
   36     # Start daemons.
   37     echo -n $"Starting $prog: "
   38     startproc /usr/sbin/spammiltd ${ARGS}
   39     rc_status -v
   40     ;;
   41   stop)
   42     # Stop daemons.
   43     echo -n $"Shutting down $prog: "
   44     killproc spammiltd
   45     rc_status -v
   46     ;;
   47   restart|reload)
   48     $0 stop
   49     $0 start
   50     rc_status 
   51         ;;
   52   status)
   53     checkproc $prog
   54         rc_status -v
   55     ;;
   56   reread)
   57     killall -USR1 $prog
   58     rc_status -v
   59     ;;
   60   config)
   61     killall -USR2 $prog
   62     rc_status -v
   63     ;;
   64   *)
   65     echo $"Usage: $0 {start|stop|restart|status|reread|stats}"
   66     exit 1
   67 esac
   68 
   69 exit $RETVAL
   70