0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-16 10:31:07 +00:00
netdata_netdata/system/systemd/50-netdata.preset
Austin S. Hemmelgarn 2a9c0b54b1
Fix how we are handling system services in RPM packages. ()
* 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.
2023-03-27 09:19:27 -04:00

1 line
23 B
Text