"Gerrit Pape" <[EMAIL PROTECTED]> wrote:

>On Mon, Mar 05, 2001 at 09:07:19AM -0500, Dave Sill wrote:
>> Assuming you're running svscan on /service (not /supervise) already,
>> e.g. from inittab, you could change the "start" section in the script
>> to:
>> 
>>     echo -n "Starting qmail"
>>     ln -s /var/qmail/supervise/* /service
>>     echo "."
>>     ;;

I didn't think this through very carefully. I think it'd be better to:

  touch /var/qmail/supervise/*/down /var/qmail/supervise/*/log/down
  ln -s /var/qmail/supervise/* /service

Once as root, and change the "start" section to:

     echo -n "Starting qmail"
     svc -u /service/qmail-send /service/qmail-smtpd
     svc -u /service/qmail-send/log /service/qmail-smtpd/log
     echo "."
     ;;

This will make it into LWQ after I've had a chance to test and debug
it.

>> And the "stop" section to:
>> 
>>     echo -n "Stopping qmail: qmail-send qmail-smtpd"
>>     svc -dx /service/qmail-send /service/qmail-smtpd
>>     echo -n " logging"
>>     svc -dx /service/qmail-send/log /service/qmail-smtpd/log
>>     echo "."
>>     ;;
>>
>Huh, svscan will restart Your supervise processes and services in max 5
>seconds. You need to remove the links first, then -dx supervise,

No, I just forgot to remove the "x" flags. Make it:

     echo -n "Stopping qmail: qmail-send qmail-smtpd"
     svc -d /service/qmail-send /service/qmail-smtpd
     echo -n " logging"
     svc -d /service/qmail-send/log /service/qmail-smtpd/log
     echo "."
     ;;

>if You really want to use such silly initscripts, better use svc
>directly.

What makes this a "silly initscript"? What's the right way to do this
stuff in your OS religion?

In what way does it not run svc directly?

-Dave

Reply via email to