Skip to content

Commit 9a887ca

Browse files
committed
Check for the exact option matches while grepping
Signed-off-by: Tim Jespers <[email protected]>
1 parent bbf2d50 commit 9a887ca

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
@@ -77,7 +77,7 @@ get_fpm_status() {
7777
check_fpm_health_by() {
7878
OPTION=$(echo "$1" | sed 's/--//g; s/-/ /g;')
7979
VALUE_EXPECTED="$2";
80-
VALUE_ACTUAL=$(echo "$FPM_STATUS" | grep "^$OPTION" | cut -d: -f2 | sed 's/ //g')
80+
VALUE_ACTUAL=$(echo "$FPM_STATUS" | grep "^$OPTION:" | cut -d: -f2 | sed 's/ //g')
8181

8282
if test "$VERBOSE" = 1; then printf "'%s' value '%s' and expected is less than '%s'\\n" "$OPTION" "$VALUE_ACTUAL" "$VALUE_EXPECTED"; fi;
8383

0 commit comments

Comments
 (0)