3 ms·
I agree, but having an option instead of having to do ExecStop=path-to-shell-script-that-does-some-stupid-housekeeping is pretty neat. Most shepherd service de
by bjoli 8y ago
I agree, but having an option instead of having to do ExecStop=path-to-shell-script-that-does-some-stupid-housekeeping is pretty neat.
Most shepherd service definitions are simple and stupid, but as always it is a matter of taste.
- nerdponx 8y agoBut the shell scripts are more or less portable across systems, whereas this way you were asking developers to re-implement the same cleanup logic in another language.
- 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.