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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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?