2 ms·
> but having an option instead of having to do ExecStop=path-to-shell-script-that-does-some-stupid-housekeeping is pretty neat. IMO this is usually the result
by stephenr 8y ago
> but having an option instead of having to do ExecStop=path-to-shell-script-that-does-some-stupid-housekeeping is pretty neat.
IMO this is usually the result of eg a Debian package that also ships sysvinit startup scripts, and thus they share some logic.
If it’s not that case I wonder why the cleanup can’t just be handled in the unit directly.
- Skunkleton 8y agoPerhaps the service being managed doesn't clean up after itself properly? It is a fairly common pattern for a program to ship without startup scripts, and then have startup scripts added by package maintainers.
- stephenr 8y agoRight that’s certainly a thing but what I meant is, why not just put the cleanup instructions in the unit file.
- Skunkleton 8y agoBecause "cleanup" can be non-trivial. Maintaining scripts inside unit files is a pain in the ass.