Commit Graph

13 Commits

Author SHA1 Message Date
Julien Reichardt
ddbdb69658 add more variables for start-stop-daemon and supervise-daemon options
Add the following variables to expose more arguments that can be passed
to start-stop-daemon or supervise-daemon:

- directory will be passed to --chdir
- error_log will be passed to --stderr
- output_log will be passed to --stdout
- umask will be passed to umask

This is for #184.
2017-11-29 15:06:06 -06:00
William Hubbs
913b2ca537 supervise-daemon: use RC_SVCNAME as the first argument to the daemon
This makes ps show which service the supervisor is monitoring.
2017-10-27 19:22:09 -05:00
William Hubbs
82da844b42 implement "unsupervised" status
The unsupervised status is to be used when a supervisor of a supervised
service dies but leaves the service daemon itself running.
2017-10-26 13:11:12 -05:00
William Hubbs
6f3e2e2d7d supervise-daemon.sh: fix status function with no namespaces 2017-10-25 21:20:15 -05:00
William Hubbs
a428c325a9 add "unsupervised" status and return code 64 to supervise-daemon status function
This is to be used if the service is being supervised and the
supervisor is somehow killed.

Currently, this is very linux specific, but I will expand to other
platforms, patches are welcome.
2017-10-25 15:09:42 -05:00
William Hubbs
17b5cc78d3 add retry option to supervise-daemon
The --retry option for supervise-daemon defines how the supervisor will
attempt to stop the child process it is monitoring. It is defined when
the supervisor is started since stopping the supervisor just sends a
signal to the active supervisor.

This fixes #160.
2017-09-06 17:22:21 -05:00
William Hubbs
4c89e3f5fa supervise-daemon:create multiple options from --respawn-limit
This creates --respawn-delay, --respawn-max and --respawn-period. It was
suggested that it would be easier to follow if the options were
separated.

This is for #126.
2017-05-10 18:13:23 -05:00
William Hubbs
3673040722 supervise-daemon: add a --respawn-limit option
Allow limiting the number of times supervise-daemon will attempt to respawn a
daemon once it has died to prevent infinite respawning. Also, set a
reasonable default limit (10 times in a 5 second period).

This is for issue #126.
2017-05-09 18:30:08 -05:00
William Hubbs
d6c30ab12a Revert "Remove eval calls from supervisor start functions"
This reverts commit 0d1f1010c2.
We need the eval in case someone uses something like:
command_args="this \"is a\" test"

This is related to #77.
2016-09-20 11:33:56 -05:00
William Hubbs
0d1f1010c2 Remove eval calls from supervisor start functions
This fixes #77.
2016-09-19 18:03:57 -05:00
William Hubbs
8a8032478a Make use of name vs RC_SVCNAME consistent in supervisor scripts
This fixes #79.
2016-09-13 12:52:10 -05:00
William Hubbs
3351c8b4c3 supervise-daemon.sh: add support for chroot variable 2016-05-19 17:59:40 -05:00
William Hubbs
62410eaf4b add daemon supervisor
The supervise-daemon process is meant to be a lightweight supervisor
which can monitor and restart a daemon if it crashes.
2016-04-27 11:13:50 -05:00