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

Improvements to beatname.sh #5051

Merged
merged 1 commit into from
Aug 29, 2017
Merged

Conversation

andrewkroh
Copy link
Member

Use exec with the command to start the beat so that it replaces the shell process leaving only the beat process. This is nicer because you don't have the "beatname.sh" process showing up in ps output.

Change the hashbang to #!/usr/bin/env bash instead of #!/bin/bash. This is generally more portable.

@andrewkroh
Copy link
Member Author

I did a quick manual test on Centos 7.

Copy link
Contributor

@exekias exekias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! just a minor comment

@@ -1,9 +1,9 @@
#!/bin/bash
#!/usr/bin/env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think bash is missing here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should have copied the file instead of typing it twice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Use `exec` with the command to start the beat so that it replaces the shell process leaving only the beat process. This is nicer because you don't have the "beatname.sh" process showing up in `ps` output.

Change the hashbang to `#!/usr/bin/env bash` instead of `#!/bin/bash`. This is generally more portable.
Copy link
Contributor

@exekias exekias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in Ubuntu 17.04

@exekias exekias merged commit 753cf9e into elastic:master Aug 29, 2017
@andrewkroh andrewkroh deleted the feature/beatname-sh branch December 14, 2017 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants