Skip to content

Commit

Permalink
IDE says commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wilson1000 committed Oct 16, 2024
1 parent c7423aa commit c6be1f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bin/fpm-liveness.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env sh

# Exit with code 1 if any php process has been running for more than 1 hour.
if [ $(ps -o time,comm | grep -c '.*h.*php-fpm') -gt 0 ]; then exit 1; fi
# shellcheck disable=SC2009
if [ "$(ps -o time,comm | grep -c '.*h.*php-fpm')" -gt 0 ]; then exit 1; fi
6 changes: 3 additions & 3 deletions bin/fpm-readiness.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env ash

# Send a ping request via fcgi. Use an empty environment with `env -i`.
# Send a ping request via fast-cgi. Use an empty environment with `env -i`.
PING_RESPONSE=$(env -i SCRIPT_NAME=/ping SCRIPT_FILENAME=/ping REQUEST_METHOD=GET cgi-fcgi -bind -connect /sock/fpm.sock | tail -1);

# Exit with code 1 if the ping response was not 'pong'.
if [ "$PING_RESPONSE" != 'pong' ]; then exit 1; fi;

# Request the fpm status via fcgi.
# Request the fpm status via fast-cgi.
FPM_STATUS=$(env -i SCRIPT_NAME=/status SCRIPT_FILENAME=/status REQUEST_METHOD=GET cgi-fcgi -bind -connect /sock/fpm.sock);

# Exit with code 1 if the status is 'Could not connect to /sock/fpm.sock'.
if [ $(echo "$FPM_STATUS" | grep -c 'Could not connect') -gt 0 ]; then exit 1; fi;
if [ "$(echo "$FPM_STATUS" | grep -c 'Could not connect')" -gt 0 ]; then exit 1; fi;
Empty file modified bin/fpm-status.sh
100644 → 100755
Empty file.

0 comments on commit c6be1f0

Please sign in to comment.