1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#!/bin/sh
#
# Start or stop SAUCE
#
# $Id: initd,v 1.7 2001/03/21 18:33:55 ian Exp $
# (copied from Robert Leslie <rob@mars.org>'s named script, and then modified)
test -x /usr/sbin/sauce-run || exit 0
. /etc/sauce/sys-config
set -e
case "$1" in
start)
if sauceadmin '' 2>/dev/null >/dev/null; then exit 0; fi
echo Starting smapblocking mail receiver: sauce.
/usr/sbin/sauce-run &
;;
stop)
echo -n "Stopping spamblocking mail receiver: "
set +e
sauceadmin --sauceadmin-connrefused-ok=true shutdown
set -e
echo -n sauce
start-stop-daemon --stop -oq --retry 30 -u mail -n sauce
echo "."
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reloading sauce configuration..."
sauceadmin --sauceadmin-connrefused-ok=true readconfig || test $? == 1
echo "done."
;;
force-reload)
$0 reload
;;
*)
echo "Usage: /etc/init.d/sauce {start|stop|reload|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
|