How to specify cleanup commands for `systemctl disable --now`?
1
vote
1
answer
214
views
I just learned the (hard way) that in a systemd service file, the
ExecStopPost
commands are not executed on
systemctl disable --now myservice.service
They are only executed on
systemctl stop myservice.service
(which might then be followed by systemctl disable myservice.service
).
I have two questions on this:
1. What is the rationale behind that behaviour?
2. How can I specify cleanup commands that are also executed on systemctl disable --now
?
Asked by vog
(429 rep)
Nov 1, 2024, 10:46 AM
Last activity: Nov 1, 2024, 06:28 PM
Last activity: Nov 1, 2024, 06:28 PM