假设我写了一个mine.service
文件。然后我使用systemctl enable mine.service
.
如果我后来决定编辑mine.service
,我是否必须告诉systemd
它mine.service
已更改?如果是这样,我该怎么做?
我正在阅读有关的联机帮助页systemctl reload
,发现这句话是关于reload
.
reload PATTERN...
Asks all units listed on the command line to reload their
configuration.
Run Code Online (Sandbox Code Playgroud)
http://man7.org/linux/man-pages/man1/systemctl.1.html
systemd 是如何做到的?systemd 使用什么 API 来要求单元重新加载其配置?
我也发现了reload-or-restart
。
reload-or-restart PATTERN...
Reload one or more units if they support it. If not, restart them
instead.
Run Code Online (Sandbox Code Playgroud)
systemd 如何知道单元是否支持重新加载?