diff options
author | mpaperno <max@wdg.us> | 2012-08-30 05:32:01 +0200 |
---|---|---|
committer | mpaperno <max@wdg.us> | 2012-08-30 05:32:01 +0200 |
commit | 53210b068e4dbda66a095f692a710ed6f7988e80 (patch) | |
tree | aadd9809953f95bde9ee68203570ff54526b10ab /misc | |
download | spampd-53210b068e4dbda66a095f692a710ed6f7988e80.tar.gz spampd-53210b068e4dbda66a095f692a710ed6f7988e80.tar.xz |
Initial commit
Diffstat (limited to 'misc')
-rw-r--r-- | misc/spampd-rh-rc-script.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/misc/spampd-rh-rc-script.sh b/misc/spampd-rh-rc-script.sh new file mode 100644 index 0000000..5b90c0b --- /dev/null +++ b/misc/spampd-rh-rc-script.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# +# This script starts and stops the spampd daemon +# +# chkconfig: 2345 80 30 +# +# description: spampd is a daemon process which uses SpamAssassin to check +# email messages for SPAM. + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +[ -f /usr/bin/spampd -o -f /usr/local/bin/spampd ] || exit 0 +PATH=$PATH:/usr/bin:/usr/local/bin + +# See how we were called. +case "$1" in + start) + # Start daemon. + echo -n "Starting spampd: " + daemon spampd --port=10025 --relayhost=127.0.0.1:25 --tagall --auto-whitelist + RETVAL=$? + touch /var/lock/spampd + echo + ;; + stop) + # Stop daemons. + echo -n "Shutting down spampd: " + killproc spampd + RETVAL=$? + rm -f /var/lock/spampd + echo + ;; + restart) + $0 stop + $0 start + ;; + status) + status spampd + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit 0 |