#!/bin/sh

# cgi-fcgi has issues with non-standard environment variables, so this script
# is called with "env -i" to clean the environment
# This script calls the /ping endpoing of the php-fpm, if the return code is 0, the php-fpm has correctly started
env -i SCRIPT_NAME=/${1:-ping} SCRIPT_FILENAME=/${1:-ping} REQUEST_METHOD=GET /usr/bin/cgi-fcgi -bind -connect 127.0.0.1:9000
