Forum OpenACS Q&A: Re: AOLserver 4 and daemontools

Collapse
Posted by Mark Aufflick on
My CVS/Tag file tells me I compiled aolserver_v40_r2.

Is svc -du different to svc -t ?

Collapse
Posted by Randy O'Meara on
Mark,

My svc(8) page says:

       -u     Up. If the service is not running,  start  it.  If  the  service
              stops, restart it.
                                                                                
       -d     Down.  If the service is running, send it a TERM signal and then
              a CONT signal. After it stops, do not restart it.
                                                                                
       -t     Terminate. Send the service a TERM signal.
So, it looks like -du sends TERM then CONT while -t just sends TERM. It doesn't really say if -d and -u are handled serially or in the order of appearance. I've never used it this way.

Bart, do you know?

/R

Collapse
Posted by Bart Teeuwisse on
Randy,

svc executes the flags in the order of appearance. Thus 'svc -hdu' rolls the AOLserver log (when not using multilog), stops the server and restarts it again. The rolled log starts with the message that the server is shutting down followed by the restart.

Where as 'svc -dhu' will stutdown the server, send a SIGHUP which will be missed as the server is down and restart the server. In this case the server restarts but the log won't be rolled.

For the sake of completeness, when using multilog, AOLserver runs in foreground mode and won't write to a log itself. Instead the messages to STDOUT are piped to mutilog who writes it to a different log. Rolling a multilog is done w/ 'svc -a'.

I've ran AOLserver in both configurations. I favor multilog as it garantues that the logs won't exceed a set maximum amount of disk space. With a wrapper script in /etc/init.d both configurations can be controled with 'service <service0> {start|stop|restart|roll|stat}'.

/Bart