For good or bad... systemd is the de facto standard in Linux to manage services. Let's add support to it.
Some considerations:
We must manage unit definitions and on changes, call systemctl daemon-reload and systemctl reload-or-restart $unit.
We may either create a new resource type SystemdUnit or integrate with File to implement that.
We should integrate with APTPackage, to detect changes to any package configuration files, and identify if the package contains any systemd units, and then systemctl reload-or-restart $unit on changes.
Systemd would most likely needs not only the refresh but also if you to have it enabled on boot or not, the (in)famous systemctl enable service-name.
Reload should check if unit exists or not and act on it.
For good or bad... systemd is the de facto standard in Linux to manage services. Let's add support to it.
Some considerations:
systemctl daemon-reload
andsystemctl reload-or-restart $unit
.SystemdUnit
or integrate withFile
to implement that.APTPackage
, to detect changes to any package configuration files, and identify if the package contains any systemd units, and thensystemctl reload-or-restart $unit
on changes.References: