Menu

#9 Daemon mode, SysV startup scripts

open
nobody
None
5
2009-05-08
2009-05-08
Jon Schutz
No

The attached patch adds a '-d' (daemonise) option to scribed so that it can more easily be invoked as a system service, and also provides SysV startup scripts for RedHat (CentOS/Fedora) and Ubuntu/Debian in the contrib directory.

Discussion

  • Jon Schutz

    Jon Schutz - 2009-05-08
     
  • Anthony Giardullo

    Looks great. Thanks for the contribution.

    Would it be possible to stop Scribe by sending it a stop message(see examples/scribe_ctrl) instead of killing the process? Sending a stop message will make Scribe shut down gracefully and not lose any data.

     
  • Jon Schutz

    Jon Schutz - 2009-06-29

    The difficulty with sending a stop message is getting the shell script to do it without knowing which client libraries the user has installed. Obviously the existence of examples/scribe_ctrl can't be relied on in the SysV script, and even having the python libraries isn't a given. Options that I have considered are:

    * Getting scribed to handle a SIGHUP and do a graceful shutdown, as many daemons do.

    * Having a scribe_ctl binary that is always installed with scribed

    * Adding the control functionality to scribed itself, i.e. 'scribed --stop' would stop any running instances.

    * Setting policy that a particular client library is always built and installed, then the SysV scripts could generate and run the minimal script needed to send the stop signal.

    The first option (HUP) is probably easiest from many points of view, but seems there is a policy decision to be made here. Any guidance?

     

Log in to post a comment.