cmdmon: add reload sources command

Add the command which reloads the files from the directories specified
by the sourcedirs directive.
This commit is contained in:
Miroslav Lichvar
2020-06-10 11:20:43 +02:00
parent 519796de37
commit d69ac07183
6 changed files with 51 additions and 4 deletions

View File

@@ -2152,8 +2152,12 @@ confdirs @SYSCONFDIR@/chrony.d /var/run/chrony.d /usr/lib/chrony.d
[[sourcedirs]]*sourcedirs* _directory_...::
The *sourcedirs* directive is identical to the *confdirs* directive, except the
configuration files have the _.sources_ suffix and they can only specify NTP
sources (i.e. use the *server*, *pool*, and *peer* directive).
configuration files have the _.sources_ suffix, they can only specify NTP
sources (i.e. use the *server*, *pool*, and *peer* directive), and can be
reloaded by the <<chronyc.adoc#reload,*reload sources*>> command in
*chronyc*. It is particularly useful with dynamic sources like NTP servers
received from a DHCP server, which can be written to a file specific to the
network interface by a networking script.
+
An example of the directive is:
+

View File

@@ -928,6 +928,11 @@ Sources that stop responding will be replaced with newly resolved addresses
automatically after 8 polling intervals, but this command can still be useful
to replace them immediately and not wait until they are marked as unreachable.
[[reload]]*reload* *sources*::
The *reload sources* command causes *chronyd* to re-read all _*.sources_ files
from the directories specified by the
<<chrony.conf.adoc#sourcedirs,*sourcedirs*>> directive.
[[sourcename]]*sourcename* _address_::
The *sourcename* command prints the original hostname or address that was
specified for an NTP source in the configuration file, or the *add* command.