From: Zachary Vance Date: Sat, 23 Apr 2016 21:28:14 +0000 (-0700) Subject: Test multiple cgi scripts X-Git-Url: https://git.za3k.com/?a=commitdiff_plain;h=382e0c0d43ed075d0a04e26bc640a577bfcfbfaa;p=za3k.git Test multiple cgi scripts --- diff --git a/cgi-bin/service.status.d/multiple cgi scripts b/cgi-bin/service.status.d/multiple cgi scripts new file mode 100644 index 0000000..f46ab25 --- /dev/null +++ b/cgi-bin/service.status.d/multiple cgi scripts @@ -0,0 +1,14 @@ +TESTSITE="https://za3k.com/archive/test.md" +timeout 3 curl "${TESTSITE}" >/dev/null 2>/dev/null +SUCCESS=$? + +if [ "$SUCCESS" -eq 0 ]; then + echo "Success" + exit 0 +elif [ "$SUCCESS" -eq 124 ]; then + echo "Timed out -- only one CGI script is running at a time" + exit 1 +else + echo "Markdown testing at ${TESTSITE} is failing" + exit 2 +fi