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

Checking if puppet is running... Not working. #2

Open
ghost opened this issue Aug 6, 2012 · 1 comment
Open

Checking if puppet is running... Not working. #2

ghost opened this issue Aug 6, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 6, 2012

[ "$(ps axf|egrep "/usr/bin/ruby /usr/sbin/puppetd|/usr/bin/ruby1.8 /usr/bin/puppet agent")" ] || result 4

Hello aswen, this above line does not work (at least not on my centos systems) I've been running this check for a long time but I just noticed that this doesnt work or I would of let you know sooner. anyways, the egrep line is always matched in the ps axf output. you could easily add egrep -v egrep but Im not a fan of multiple grep's.

I think this line, below, will cover most cases on all linux os's. If you are running puppet master on the same box you could get a false positive. I dont think unixs come with this command, but I dont think that matters since egrep probably doesnt come with them either.

anyways... the above can be changed with:

[ "$(pgrep puppet")" ] || result 4

after which checking if puppet is running should work as expected.

Once again, thanks for this plugin. It is appreciated.

@aswen
Copy link
Owner

aswen commented Dec 15, 2015

aswen pushed a commit that referenced this issue Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant