[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: init file questions



On Mon, Jun 21, 1999 at 11:30:10PM -0400, Jim Knoble wrote:
> The language of `reload' and `force-reload' bothers me a bit.  There
> must be a better way of distinguishing between the actions, especially
> if `force-reload' is required (and hence is more likely to be used) and
> `reload' is not (and hence less likely).

Why not take a page from the Apache book:

graceful   - do a graceful restart by sending a SIGUSR1 or start if not running

In the Apache situation this allows the Apache children to finish the current
request then restart with the new config....I am not implying to use SIGUSR1
for the handling just pointing out an effective way of _gracefully_ allowing
a daemon to continue running and change its config dynamically.

So why not have 'restart' do the equivalent of a 'stop' then 'start'
and let 'graceful' correspond to the means each daemon uses (if available)
to dynamically change configurations.

The below snippet would be the updated section of the spec.

------- start of cut text --------------
Init files should accept one argument, saying what to do:

start
     start the service,

stop
     stop the service,

restart
     stop and restart the service if the service is already running,
     otherwise start the service

graceful
     cause the configuration of the service to be reloaded without
     actually stopping and restarting the service, if the service is not
     running it is started

status
     return (and optionally display) the current status of the service

------- end of cut text --------------
 
<Deleted>
force-reload
     cause the configuration to be reloaded if the service supports
     this, otherwise restart the service.    
</Deleted>
I don't see how this directive would be different from restart...both stop
and start the server, and when the new server comes up it reads its config 
files.


Shane Owenby
shane@raleigh.ibm.com
IBM-Apache Development


Reply to: