exit 1
fi
-# See how we were called.
-case "$1" in
- start)
+start() {
# Start daemon.
if [ ! -f /var/lock/subsys/spamd ]; then
msg_starting SpamAssassin
else
msg_already_running SpamAssassin
fi
- ;;
- stop)
+}
+
+stop() {
# Stop daemons.
if [ -f /var/lock/subsys/spamd ]; then
msg_stopping SpamAssassin
else
msg_not_running SpamAssassin
fi
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart)
- $0 stop
- $0 start
+ stop
+ start
;;
status)
status spamd