[Mimedefang] OT: Sendmail Startup Script

Jeff Grossman jeff at stikman.com
Fri Aug 23 17:06:01 EDT 2002


on 8/23/02 12:39 PM, David F. Skoll at dfs at roaringpenguin.com wrote:

> 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.
> 
Thanks for the example.  I will give it a try.

Jeff
-- 
Jeff Grossman (jeff at grossman.name)




More information about the MIMEDefang mailing list