Classification: PUBLIC
My start script looks like this:
Use chkconfig --add to run at startup...
-------------
#!/bin/sh
#
# spamassassin This script starts and stops the spamd daemon
#
# chkconfig: 2345 80 30
#
# description: spamd is a daemon process which uses SpamAssassin to check
# email messages for SPAM. It is normally called by spamc
# from a MDA.
# 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/spamd -o -f /usr/local/bin/spamd ] || exit 0
PATH=$PATH:/usr/bin:/usr/local/bin
# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n "Starting spamd: "
# daemon spamd -d -x -a -u filter -m 5
daemon spamd -d -x -a -u filter -H /home/filter -m 8
RETVAL=$?
touch /var/lock/spamd
echo
;;
stop)
# Stop daemons.
echo -n "Shutting down spamd: "
killproc spamd
RETVAL=$?
rm -f /var/lock/spamd
echo
;;
reload)
$0 stop
$0 start
;;
restart)
$0 stop
$0 start
;;
status)
status spamd
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0
| -----Original Message-----
| From: Jason Kohles [mailto:[EMAIL PROTECTED]]
| Sent: Friday, December 20, 2002 10:34 AM
| To: Thomas Kinghorn
| Cc: Spamassassin-Talk "(E-mail)
| Subject: Re: [SAtalk] startup script for SA on Redhat 8
|
|
| On Fri, 2002-12-20 at 04:14, Thomas Kinghorn wrote:
| > Does anyone have a startup script for redhat 8?
| >
| > I have tried the one that comes with SpamAssassin 2.43 but
| it doesn't
| > work.
| >
| > ./redhat-rc-script.sh start
| > ./redhat-rc-script.sh: line 9: my: command not found
| > ./redhat-rc-script.sh: line 10: my: command not found
| > ./redhat-rc-script.sh: line 11: my: command not found
| > ./redhat-rc-script.sh: line 12: use: command not found
| > ./redhat-rc-script.sh: line 14: use: command not found
| > ./redhat-rc-script.sh: line 15: use: command not found
| > ./redhat-rc-script.sh: line 16: use: command not found
| > ./redhat-rc-script.sh: line 17: use: command not found
| > ./redhat-rc-script.sh: line 18: use: command not found
| > ./redhat-rc-script.sh: line 19: use: command not found
| > ./redhat-rc-script.sh: line 20: use: command not found
| > ./redhat-rc-script.sh: line 21: use: command not found
| > ./redhat-rc-script.sh: /etc/sysconfig/spamd: line 22: syntax error
| > near unexpected token `('
| > ./redhat-rc-script.sh: /etc/sysconfig/spamd: line 22: `use
| Sys::Syslog
| > qw(:DEFAULT setlogsock);' Starting spamd: ^C
| >
|
| The error messages here indicate that redhat-rc-script.sh is
| not a shell script, it's a perl script, make sure it starts
| with an appropriate '#!/usr/bin/perl -w' line, or the like.
|
| --
| Jason Kohles [EMAIL PROTECTED]
| Senior Engineer Red Hat Professional Consulting
|
|
|
| -------------------------------------------------------
| This SF.NET email is sponsored by: The Best Geek Holiday
| Gifts! Time is running out! Thinkgeek.com has the coolest gifts for
| your favorite geek. Let your fingers do the typing. Visit Now.
| T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
| _______________________________________________
| Spamassassin-talk mailing list [EMAIL PROTECTED]
| https://lists.sourceforge.net/lists/listinfo/spamassassin-talk
|
-------------------------------------------------------
This SF.NET email is sponsored by: The Best Geek Holiday Gifts!
Time is running out! Thinkgeek.com has the coolest gifts for
your favorite geek. Let your fingers do the typing. Visit Now.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk