Mike Kazantsev wrote:

# /etc/init.d/MailScanner stop
* Stopping MailScanner...
* MailScanner: caught SIGTERM, aborting

Looks like there's a line in "stop" section that kills the script
itself. Try looking for a lines like these:
  pkill MailScanner
  killall MailScanner
  start-stop-daemon --stop --name MailScanner

The /etc/init.d/MailScanner script looks so:
----------------------------------
#!/sbin/runscript
opts="${opts} reload"
depend() {
        need net mta
        use logger dns }

start() {
        ebegin "Starting MailScanner"
        /usr/sbin/check_MailScanner >/dev/null
        RETVAL=$?
        [ ${RETVAL} -eq 0 ] && touch /var/lock/subsys/MailScanner
        [ ${RETVAL} -eq 0 ] && rm -f /var/lock/subsys/MailScanner.off
        eend ${RETVAL}
}

stop() {
        ebegin "Stopping MailScanner"
        killall -15 MailScanner
        RETVAL=$?
        [ ${RETVAL} -eq 0 ] && rm -f /var/lock/subsys/MailScanner
        [ ${RETVAL} -eq 0 ] && touch /var/lock/subsys/MailScanner.off
        eend ${RETVAL}
}
# restart () {} and reload () {} removed
----------------------------------

Sure, they might be killing the app as well (if the process has
MailScanner in it's name), but there should be full path or pid-based
line instead, so the initscript will exit cleanly.

# /etc/init.d/MailScanner start
* WARNING: MailScanner has already been started

Following command should "wipe" initscript memory:

  /etc/init.d/MailScanner zap

Yes, this works. But as you said, it is just workaround. Not very
clean solution...

Actually, MailScanner stops, but sendmail which has been
started by MailScanner init script is still there running:

# ps -e | grep sendmail
18676 ?        00:00:00 sendmail
18679 ?        00:00:00 sendmail

Could be because of aforementioned script "self-destruction".
If sendmail really started by the same script, not as a dependency,
that is.

Don't know exactly how sendmail is started, but according to
MailScanner install messages, I had to remove it from default
runlevel. MailScanner itself takes care of starting sendmail...

Jarry

--
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.

Reply via email to