Closed siredmar closed 2 years ago
Thanks for the contribution! I will merge as is since LGTM, but actually the main source of the reloader process was moved to be located at: https://github.com/nats-io/nack/blob/main/cmd/nats-server-config-reloader/main.go so I have ported over your changes as part of this PR: https://github.com/nats-io/nack/pull/62
This PR allows the config reloader to send a custom signal to the nats server. This can be useful where the user is forced to restart the nats server in order to load a modified configuration (e.g. modified leafnode settings).
Using the config reloader, this PR fixes https://github.com/nats-io/nats-server/issues/1921 as a workaround by allowing the reloader to send a custom signal, e.g. sigterm forcing to terminate the nats server. On the next startup the new configuration will be used.