something strange

Hello,

When I configured clam and spamassasin I’ve added these two lines in the /etc/rc.d/init.d/smtp :
/etc/rc.d/init.d/spamd start
/etc/rc.d/init.d/clamd start
in the start function and same with stop in the stop function.

start() {
for dir in $progdirs
do
export PATH=“/usr/bin:/var/qmail/bin:/var/vpopmail/bin:$PATH”
export QMAILQUEUE=“/var/qmail/bin/qmail-scanner-queue.pl”
/etc/rc.d/init.d/spamd start
/etc/rc.d/init.d/clamd start
$svc -u $dir

but when I launch /etc/rc.d/init.d/smtp start, it try to start clamd and spamd two times !!!

[root@server1 /]# /etc/rc.d/init.d/smtp start
Starting spamd: [ OK ]
Starting clamd: [ OK ]
Starting spamd: Could not create INET socket: Address already in use IO::Socket::INET: Address already in use
[FAILED]
Starting clamd: [ OK ]
Starting smtp: [ OK ]

I’ve check and recheck and I only have clamd and spamd start operation ONE time.

It does the same when I stop smtp service.

Any idea ?

thanks