I was reading the manpage for systemctl reload
and found this sentence about reload
.
reload PATTERN...
Asks all units listed on the command line to reload their
configuration.
http://man7.org/linux/man-pages/man1/systemctl.1.html
How does systemd do that? What API does systemd use to ask a unit to reload its configuration?
I also found reload-or-restart
.
reload-or-restart PATTERN...
Reload one or more units if they support it. If not, restart them
instead.
How does systemd know if the unit supports reload?
Here's what the man page
systemd.service
says about reloading:(The only way to know that
systemd.service
is the correct man page to look in was to Google forExecReload
, a string I guessed after digging through Systemd's source code.)