diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2023-03-27 09:19:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 09:19:27 -0400 |
commit | 2a9c0b54b1759c31c99669498cabc5606ecea193 (patch) | |
tree | f8dee3c9ba559c21e7215c7a20c71ff23c1a167b /packaging | |
parent | 03dc41202ac4d65ca156095f317580d71e8603f3 (diff) |
Fix how we are handling system services in RPM packages. (#14781)
* Drop non-systemd init code in RPM spec file.
All of our currently supported RPM-based platforms are systemd-based, so
this is functionally dead code.
* Fix how we handle systemd service installation.
- Rely on the platform-provided macros, instead of doing our own thing.
These do the right thing in 99.99% of cases, and behave how we
actually need them to.
- Don’t depend on systemd at runtime. The macros handle this correctly,
and nothing we actually do _needs_ systemd at runtime.
- Actually follow packaging guidelines for upgrades. In particular, only
restart the agent if it’s already running (instead of unconditionally),
and don’t enable it if it’s disabled.
- Just put the macro invocations down in the actual scriptlets, instead
of using complicated nested macro definitions to compute things ahead
of time. This makes the code _much_ easier to understand.
* Add a systemd preset file so the service is enabled by default.
Diffstat (limited to 'packaging')
0 files changed, 0 insertions, 0 deletions