Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Conversation

@PierreF
Copy link

@PierreF PierreF commented Jun 22, 2017

For a daemon, the init.d script use a PID to track the process. Usually PID are stored in /run or /var/run.

In case of daemon running as non-root, the PID dir must be writable by the daemon user. The solution was to create a folder /var/run/daemon-name/ owned the the daemon user. The folder was created during installation (e.g. in the package .rpm or .deb).

But in most current Linux distribution (at least Ubuntu, CentOS and Fedora), /var/run and /run are tmpfs which is not persisted across reboot, so the /var/run/daemon-name/ need to be re-created.

This PR add the creation of the PID dir and changing ownership to user.

It will fix jmxtrans issue jmxtrans/jmxtrans#578

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant