0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-03 04:55:33 +00:00
Commit graph

2 commits

Author SHA1 Message Date
Austin S. Hemmelgarn
39e629e24c
Consistently start the agent as root and rely on it to drop privileges properly. ()
* Consolidate preparation of required directories.

The only differences between cases where the prep is done is how we
derive the UID and GID that get passed to some of the functions. By just
encapsulating the preparation in a function like this, we make this
differentiation obvious while also making it easier to modify what
directories need to be created or prepared.

* Create the log directory if it does not already exist.

We treat the log directory not existing as a fatal error, but we can (in
most cases) just create it on startup, so just do so.

* Trust netdata to handle dropping privileges itself.

This allows more correct behavior with respect to handling of required
directories, and also ensures that our system service scripts properly
support running the agent as arbitrary users instead of requiring it to
run as the user configured at build time.

* Fix build issues.

* Move directory creation to be done alongside directory existence checks.

* Fix syntax errors and address review feedback.
2023-06-15 07:33:26 -04:00
Austin S. Hemmelgarn
2597f4f035
Add experimental support for running under runit. ()
* Add basic runit service script for Netdata.

* Integrate runit handling in install-service script.

* Add new runit script to .gitignore.

* Fix service file installation.

We need to ensure the service directory actually gets created, and thus
need to use `-D` with the `install` command.

* Sync with system restructure.

* Fix botched update to Makefile.am.
2023-03-14 11:40:24 -04:00