]> git.pld-linux.org Git - packages/spamassassin.git/blob - spamassassin-rc-script.patch
9b9b2e8f30b7d2c588efbeef27fe8ab2 spamassassin-makefile.patch
[packages/spamassassin.git] / spamassassin-rc-script.patch
1 diff -urN Mail-SpamAssassin-2.31.old/spamd/pld-rc-script.sh Mail-SpamAssassin-2.31/spamd/pld-rc-script.sh
2 --- Mail-SpamAssassin-2.31.old/spamd/pld-rc-script.sh   Thu Jan  1 01:00:00 1970
3 +++ Mail-SpamAssassin-2.31/spamd/pld-rc-script.sh       Sat Jul 20 14:17:33 2002
4 @@ -0,0 +1,66 @@
5 +#!/bin/sh
6 +#
7 +# spamassassin This script starts and stops the spamd daemon
8 +#
9 +# chkconfig: 2345 80 30
10 +#
11 +# description: spamd is a daemon process which uses SpamAssassin to check
12 +#              email messages for SPAM.  It is normally called by spamc
13 +#                 from a MDA.
14 +# processname: spamassassin
15 +# pidfile:     /var/run/spamassassin.pid
16 +
17 +# Source function library.
18 +. /etc/rc.d/init.d/functions
19 +
20 +# Source networking configuration.
21 +. /etc/sysconfig/network
22 +
23 +# Source configureation.
24 +if [ -f /etc/sysconfig/spamassassin ] ; then
25 +       . /etc/sysconfig/spamassassin
26 +fi
27 +
28 +# Check that networking is up.
29 +if is_no "${NETWORKING}"; then
30 +       msg_Network_Down SpamAssassin
31 +       exit 1
32 +fi
33 +
34 +# See how we were called.
35 +case "$1" in
36 +  start)
37 +       # Start daemon.
38 +       if [ ! -f /var/lock/subsys/spamd ]; then
39 +               msg_starting SpamAssassin
40 +               daemon spamd -d -c -a
41 +               RETVAL=$?
42 +               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/spamd
43 +       else
44 +               msg_Not_Running SpamAssassin
45 +       fi
46 +       ;;
47 +  stop)
48 +       # Stop daemons.
49 +       if [ -f /var/lock/subsys/spamd ]; then
50 +               echo -n "Shutting down spamd: "
51 +               killproc spamd
52 +               RETVAL=$?
53 +               rm -f /var/lock/subsys/spamd
54 +       else
55 +               msg_Already_Running SpamAssassin
56 +       fi
57 +       ;;
58 +  restart)
59 +       $0 stop
60 +       $0 start
61 +       ;;
62 +  status)
63 +       status spamd
64 +       ;;
65 +  *)
66 +       msg_Usage "$0 {start|stop|restart|status}"
67 +       exit 1
68 +esac
69 +
70 +exit $RETVAL
This page took 0.062754 seconds and 4 git commands to generate.