Re:What 'dependency' means in Unix init systems is underspec...
by JdeBP on Monday November 05, 2018 @06:46AM
(#18381555)
It isn't, of course, for the reason already given.
In fact, the Debian people created two extra programs named deb-systemd-helper (with the same enable/disable/mask/unmask syntax as systemd's own systemctl) and deb-systemd-invoke (with the same start/stop/restart syntax as systemd's own systemctl) for performing all of these actions over package upgrades, employing a parallel set of service symbolic link farms.
* https://manpages.debian.org/stretch/init-system-helpers/deb-...
* https://manpages.debian.org/stretch/init-system-helpers/deb-...
Huh. You’d think the more correct thing to do would be to do “systemctl --runtime --now mask $service; $DO_THING; systemctl --runtime unmask $service; systemctl start $service”. Or, even more correct, first detect if the service is running, then do the above, except only start the service again if it was running previously.