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

36: set: Illegal option -o pipefail #11

Closed
KarelWintersky opened this issue Sep 17, 2018 · 4 comments
Closed

36: set: Illegal option -o pipefail #11

KarelWintersky opened this issue Sep 17, 2018 · 4 comments

Comments

@KarelWintersky
Copy link

KarelWintersky commented Sep 17, 2018

Installed as

wget -O /usr/local/bin/php-fpm-healthcheck \
https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck \
&& chmod +x /usr/local/bin/php-fpm-healthcheck

result is:

# php-fpm-healthcheck
/usr/local/bin/php-fpm-healthcheck: 36: set: Illegal option -o pipefail

# php-fpm-healthcheck -v
/usr/local/bin/php-fpm-healthcheck: 36: set: Illegal option -o pipefail

@renatomefi
Copy link
Owner

renatomefi commented Sep 17, 2018

Hello!

What's the OS you're using it (or Docker image)? It's suppose to run on posix sh
Also please check if the content of the file is correct accordingly to the repository

But actually I think I was mislead by busybox, I'll make some tests on dash to see how it goes

@KarelWintersky
Copy link
Author

Ubuntu 16.04 , ZSH shell

failed

Gentoo, bash shell (root) AND ZSH shell (user) gives me:

blacktower ~ # php-fpm-healthcheck
blacktower ~ # php-fpm-healthcheck -v
Trying to connect to php-fpm via: localhost:9000

(I think, I have no PHP-FPM on my gentoo server)

@renatomefi
Copy link
Owner

Well, the idea is to use it under sh/dash since it's suppose to run under docker environment.
I indeed found out that on dash set -o pipefail isn't available, if you remove it you should be able to use, I'll patch it soon!
Also maybe I'll put an extra check if you haven't configure fpm or status page

@renatomefi
Copy link
Owner

@KarelWintersky in you can update your script and try again, just make sure you follow this firstly: https://github.com/renatomefi/php-fpm-healthcheck#enable-php-fpm-status-page

fernandesGabriel pushed a commit to fernandesGabriel/php-fpm-healthcheck that referenced this issue Nov 28, 2020
Fixes renatomefi#11
By testing with dash it was possible to see `set -o pipefail` wont't
work, it was removed and the critical code using pipe was split in two
instructions.
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

2 participants