[Mimedefang] OT: Sendmail Startup Script
David F. Skoll
dfs at roaringpenguin.com
Fri Aug 23 15:40:01 EDT 2002
On Fri, 23 Aug 2002, Jeff Grossman wrote:
> I just installed MIMEDefang 2.18 and made the change to the Sendmail startup
> script like this:
> daemon /usr/sbin/sendmail -L sm-mta -bd -q30m
> daemon /usr/sbin/sendmail -Ac -qp1m
> So, I am now running Sendmail, and a queue control process. But what do I
> do in the stop part?
Ugly, isn't it? The sendmail.org people screwed up; they should start
a queue runner from the main process and kill it when the main process
dies, too. My solution is to do this in the "stop" part:
stop() {
# Stop daemons.
echo -n $"Shutting down $prog: "
killproc sendmail
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail
# Arg... kill the queue runner, too.
killall /usr/sbin/sendmail
return $RETVAL
}
Gross. And DON'T TRY THIS on a UNIX system. On some UNIX systems,
killall kills everything. On Linux, it kills the named process.
Regards,
David.
More information about the MIMEDefang
mailing list