Skip to content

Commit d0a380b

Browse files
authored
Fix command for use on debian
On debian based images this was failing. I traced it to env -i requiring the full path to the command. In this PR, I have added $(which cgi-fcgi) to return the full path.
1 parent faf4d46 commit d0a380b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php-fpm-healthcheck

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ get_fpm_status() {
6161
if test "$VERBOSE" = 1; then printf "Trying to connect to php-fpm via: %s\\n" "$1"; fi;
6262

6363
# Since I cannot use pipefail I'll just split these in two commands
64-
FPM_STATUS=$(env -i REQUEST_METHOD="$REQUEST_METHOD" SCRIPT_NAME="$SCRIPT_NAME" SCRIPT_FILENAME="$SCRIPT_FILENAME" cgi-fcgi -bind -connect "$1" 2> /dev/null)
64+
FPM_STATUS=$(env -i REQUEST_METHOD="$REQUEST_METHOD" SCRIPT_NAME="$SCRIPT_NAME" SCRIPT_FILENAME="$SCRIPT_FILENAME" $(which cgi-fcgi) -bind -connect "$1" 2> /dev/null)
6565
FPM_STATUS=$(echo "$FPM_STATUS" | tail +5)
6666

6767
if test "$VERBOSE" = 1; then printf "php-fpm status output:\\n%s\\n" "$FPM_STATUS"; fi;

0 commit comments

Comments
 (0)