[systemd-devel] Conditionally reload a service from another service

Peter Hoeg peter at hoeg.com
Tue Aug 1 00:34:26 UTC 2023


1. decide on a global path like `/run/http/restart'
2. give your LE script access to write there
3. use a `.path' unit to trigger on the file above being created and triggering a one-liner that running as root restarts apache and deletes the file again

This way your “run as root” is limited to that one, tiny script


More information about the systemd-devel mailing list