Some services either don't support SIGHUP to reload, or need some extra logic to perform a similar operation. This feature request suggests adding a reload:'/path/to/cmd arg' to sysv/service stanzas to allow users to specify their own logic.
Braindump
The bulk of the heavy lifting is in src/service.c:service_restart(), which maybe should be renamed to service_reload(). It is (only) called by the service state machine when both svc_nohup() is false and svc_is_daemon(svc). The latter is a bit peculiar since it only applies to service stanzas, not sysv, when in fact both are treated as daemons.
So this whole chain of logic needs to be refactored, and evidently bug fixed as well.
Background
- A service: does not fork, hopefully logs to syslogd, and possibly supports SIGHUP
- A sysv: is likely a script, launching a forking service, that likely logs to syslog and equally likely supports SIGHUP
The latter of the two also very likely supports a reload command to the start-stop script.
Similar to
Some services either don't support SIGHUP to reload, or need some extra logic to perform a similar operation. This feature request suggests adding a
reload:'/path/to/cmd arg'to sysv/service stanzas to allow users to specify their own logic.Braindump
The bulk of the heavy lifting is in
src/service.c:service_restart(), which maybe should be renamed toservice_reload(). It is (only) called by the service state machine when bothsvc_nohup()is false andsvc_is_daemon(svc). The latter is a bit peculiar since it only applies to service stanzas, not sysv, when in fact both are treated as daemons.So this whole chain of logic needs to be refactored, and evidently bug fixed as well.
Background
The latter of the two also very likely supports a
reloadcommand to the start-stop script.Similar to