Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New init script doesn't work on ubuntu #4429

Closed
tsg opened this issue May 31, 2017 · 0 comments
Closed

New init script doesn't work on ubuntu #4429

tsg opened this issue May 31, 2017 · 0 comments

Comments

@tsg
Copy link
Contributor

tsg commented May 31, 2017

The change introduced in #4340 breaks the init script on older ubuntu systems (12.04 and 14.04 reported).

The check for the runuser command doesn't work. This version seems to be correct:

if command -v runuser >/dev/null 2>&1; then
    USER_WRAPPER="runuser"
fi

But even after fixing the above, go-daemon seems to fail when getting root as an option:

failed to switch to user root: No such file or directory

Found by @LeeDr.

tsg pushed a commit to tsg/beats that referenced this issue May 31, 2017
* Correct the way runuser is called
* Only use `-u $beat_user` if `beat_user` is not `root`. That's because the `-u` command seems to have issues on ubuntu systems.

Fixes elastic#4429.
@tsg tsg mentioned this issue May 31, 2017
exekias pushed a commit that referenced this issue May 31, 2017
* Correct the way runuser is called
* Only use `-u $beat_user` if `beat_user` is not `root`. That's because the `-u` command seems to have issues on ubuntu systems.

Fixes #4429.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant