Re: running qmail from /supervise

2001-03-06 Thread Peter Peltonen

Gerrit Pape wrote:

 I have svscan /service started from inittab. I have the links for the
 services in /service and normally do not remove them. Services are started
 at boot time, no need for init scripts. If I want a service to be down
 temporary, I use svc -d /service/service. Thats what I mean with 'use svc
 directly'.

I just updated my qmail to the newest RPM provided by Bruce Guenter. 

In the previous version I had I could start qmail with /etc/rc.d/init.d/qmail
start.
Now I have to use the svc-commands.

After the upgrade I found out that I have both /service and /var/service
directories. 

Svscan is started at the init from /service which has symlinks to
/var/qmail/service/SERVICE.

Can I remove the /var/service directory?


Regards, 
Peter



running qmail from /supervise

2001-03-05 Thread Neil Grant

hi

I am doing another qmail install and this time I have a /supervise directory
for dnscache, so I thought it would make sense to run qmail from there, I am
following lwq (most of the time). So I was wondering if anyone had already
adapted the lwq start up script to do this, and is it a case of instead of
starting supervise in /var/qmail/supervise linking that folder to
/supervise? and then removing the link to stop


thanks

Neil




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




RE: running qmail from /supervise

2001-03-05 Thread Jankok, Lucio

I am using supervise to run qmail-ldap with OpenLDAP, pop3 and
courier-imap. I am using /var/qmail/supervise as my base, but it
could be any other place.. /supervise for instance

regards,

Lucio Jankok

: -Original Message-
: From: Neil Grant [mailto:[EMAIL PROTECTED]]
: Sent: Monday, March 05, 2001 2:22 PM
: To: Qmail mailing list
: Subject: running qmail from /supervise
: 
: 
: hi
: 
: I am doing another qmail install and this time I have a 
: /supervise directory
: for dnscache, so I thought it would make sense to run qmail 
: from there, I am
: following lwq (most of the time). So I was wondering if 
: anyone had already
: adapted the lwq start up script to do this, and is it a case 
: of instead of
: starting supervise in /var/qmail/supervise linking that folder to
: /supervise? and then removing the link to stop
: 
: 
: thanks
: 
: Neil
: 
: 
: 
: 
: _
: Do You Yahoo!?
: Get your free @yahoo.com address at http://mail.yahoo.com
: 



Re: running qmail from /supervise

2001-03-05 Thread Dave Sill

"Neil Grant" [EMAIL PROTECTED] wrote:

I am doing another qmail install and this time I have a /supervise directory
for dnscache, so I thought it would make sense to run qmail from there, I am
following lwq (most of the time). So I was wondering if anyone had already
adapted the lwq start up script to do this, and is it a case of instead of
starting supervise in /var/qmail/supervise linking that folder to
/supervise? and then removing the link to stop

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 "."
;;

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 "."
;;

And replace /var/qmail/supervise with /service in the rest of the
script.

-Dave



Re: running qmail from /supervise

2001-03-05 Thread Gerrit Pape

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 "."
 ;;
 
 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, if You
really want to use such silly initscripts, better use svc directly.

Gerrit.
-- 
[EMAIL PROTECTED]
innominate AG
 the linux architects
tel: +49.30.308806-0  fax: -77  http://www.innominate.com



Re: running qmail from /supervise

2001-03-05 Thread Dave Sill

"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



Re: running qmail from /supervise

2001-03-05 Thread Gerrit Pape

On Mon, Mar 05, 2001 at 09:58:32AM -0500, Dave Sill wrote:
 "Gerrit Pape" [EMAIL PROTECTED] wrote:
 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?

I have svscan /service started from inittab. I have the links for the
services in /service and normally do not remove them. Services are started
at boot time, no need for init scripts. If I want a service to be down
temporary, I use svc -d /service/service. Thats what I mean with 'use svc
directly'.

Gerrit.

-- 
[EMAIL PROTECTED]
innominate AG
 the linux architects
tel: +49.30.308806-0  fax: -77  http://www.innominate.com



Re: running qmail from /supervise

2001-03-05 Thread Kris Kelley

Gerrit Pape wrote:
   if You really want to use such silly initscripts, better use svc
   directly.

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

Gerrit Pape replied:
 I have svscan /service started from inittab...  If I want a service to be
down
 temporary, I use svc -d /service/service. Thats what I mean with 'use
svc
 directly'.

Newsflash:  some people *like* using scripts that allow for more
human-readable (and easier to type) commands like 'qmail stop' and 'qmail
pause'.  As long as one understands what the script is doing and why, there
is no right, wrong, or "silly" way to do it.  TEHO.

---Kris Kelley
PS:  That's the closest I've come to a flame on this list.  I feel so
dirty...




Re: running qmail from /supervise

2001-03-05 Thread Neil Grant

thanks Dave,

I was on the right lines, I just didnt know any thing about svc.

once the links are created to /service it will start automatically on boot
up,
but if it had been stopped before shutdown (svc -d) - it will need to be
'svc -u' ed on bootup? so qmail(in init.d) should still be linked to the
rcx.d/ directories?
if qmail was run from /service would it get shutdown properly without your
'qmail stop' stuff?

I hope these questions are understandable - its 2am and I am knacked!

thanks,

Neil


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Re: running qmail from /supervise

2001-03-05 Thread Russell Nelson

Neil Grant writes:
  once the links are created to /service it will start automatically
  on boot up, but if it had been stopped before shutdown (svc -d) -
  it will need to be 'svc -u' ed on bootup?

That is a question?  Svc saves no history and sets no state that
survives rebooting.

  so qmail(in init.d) should still be linked to the rcx.d/
  directories?

No.  The only program you need to start various long-running services
is svscan.  For example, here's my /service directory on my server:

axfrdns   dnscache  ftpd  msql2dqmail rsyncdsshd
bray  etrn  httpd pop3d qmtpd smtpd tinydns

Most of these are obvious.  "bray" is not a service name but instead
the name of a friend who needs to have a tcpservice running on a
non-root port.  So I do this:
#!/bin/sh
exec setuidgid bray   tcpserver  -HRl0 0 2379 ~bray/bin/server

  if qmail was run from /service would it get shutdown properly
  without your 'qmail stop' stuff?

What does "properly" mean?  I don't know of any reboot or shutdown
program that is going to wait twenty minutes for all the qmail-remotes
to exit.  If you want it properly shutdown, you must do "svc -d
/service /service/*/log", wait for all the servers to exit, and then
reboot.

-- 
-russ nelson [EMAIL PROTECTED]  http://russnelson.com
Crynwr sells support for free software  | PGPok | Watch out!  He's got an
521 Pleasant Valley Rd. | +1 315 268 1925 voice | opinion, and he's not
Potsdam, NY 13676-3213  | +1 315 268 9201 FAX   | afraid to share it!



Re: running qmail from /supervise

2001-03-05 Thread Mark Delany

 is svscan.  For example, here's my /service directory on my server:
 
 axfrdns   dnscache  ftpd  msql2dqmail rsyncdsshd
 bray  etrn  httpd pop3d qmtpd smtpd tinydns
 
 Most of these are obvious.  "bray" is not a service name but instead
 the name of a friend who needs to have a tcpservice running on a
 non-root port.  So I do this:
 #!/bin/sh
 exec setuidgid bray   tcpserver  -HRl0 0 2379 ~bray/bin/server

Nothing wrong with this, but just as an alternative thought, nothing
stops users running their own svscan. I have a ~/service and guess how
the per-user svscans are started...


Regards.