-
Notifications
You must be signed in to change notification settings - Fork 229
Description
The rpm package should not start or enable the service upon installation. There are a situations in which this will break, one of which I hit today, and it's generally unexpected for system administrators of rpm based distros.
In my specific example:
- Another service is usually configured to listen on one of the ports that otelcol-contrib listens on in the default config
- The host was rebuilt
- otelcol was re-installed, stealing the port from the other service
- Templating my otelcol config failed for unrelated reasons and thus that port was not freed up before the other service was started
- The other service failed to start
It's also against rpm packaging guidelines on scriptlets and default services, as the default configuration listens on several ports on 0.0.0.0.
(I note also that there are rpm features to handle the things these scripts do, but moving away from nFPM is a whole other kettle of fish, so I won't dwell on that here).
I don't use any deb based distros, but I think starting packages is on install is more common there? Perhaps we need separate postinstall scripts for deb vs rpm? I am not familiar with nFPM but it does appear to support this from a quick read of the docs.
If you agree that this behaviour should change, I am willing to put up a PR.