Created
October 13, 2009 18:40
-
-
Save mpasternacki/209446 to your computer and use it in GitHub Desktop.
Ping FCGI server, using cgi-fcgi program from libfcgi library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# Ping FCGI server. Uses cgi-fcgi program from libfcgi library. | |
# Retrieves the root path (/) from host:port specified on command line. | |
if [ -z "$1" ] ; then | |
echo "Usage: $0 host:port|path/to/socket" >&2 | |
exit 1 | |
fi | |
exec env \ | |
REQUEST_METHOD=GET \ | |
SERVER_NAME=localhost \ | |
SERVER_PORT=8000 \ | |
SERVER_PROTOCOL=HTTP/1.0 \ | |
PATH_INFO=/ \ | |
cgi-fcgi -bind -connect $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment