Sometimes I forget to run systemctl daemon-reload
after editing some unit file, and I get a warning about it when doing systemctl restart ***.service
.
Why it was decided to only issue a warning instead of reloading the unit automatically? (the warning happens, so change was detected and so it is possible to simply auto-reload the file).
Answer
It appears to be a specific design choice, based around race conditions and the complexity of reading the entire conf tree.
However, one approach is to use systemctl edit
, which triggers a unit reload after it exits.