Modifying Sendmail rc script

Al Sparks data345 at yahoo.com
Mon Mar 29 06:19:48 UTC 2004


I'm rolling my own sendmail, and I'm trying to modify a sendmail init
script set up for RH.

I want to add 
     daemon sendmail –Ac –q5m
to the already inserted
     daemon /usr/sbin/sendmail -L sm-mta -bd -q1h 

So I modified the sendmail startup with:
   start() {
           # Start daemons.
           daemon /usr/sbin/sendmail -L sm-mta -bd -q1h
           echo -n $"Starting $prog: "
           RETVAL=$?
           echo
           [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail
   #       return $RETVAL
           daemon /usr/sbin/sendmail -Ac -q5m
           echo -n $"Starting $prog: "
           RETVAL=$?
           echo
           [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail
           return $RETVAL
   
   }

But of course, when I use the same script to stop the process, it only
stops the 
     /usr/sbin/sendmail -L sm-mta -bd -q1h
process.

I figure the cleanest way to make this work is to get both processes
in 
      /var/run/sendmail.pid

The comments inside the /etc/rc.d/init.d/functions seem to imply that
you can have 2 processes inside sendmail.pid for killproc to act on.

Suggestions?
  === Al





More information about the fedora-list mailing list