From 382e0c0d43ed075d0a04e26bc640a577bfcfbfaa Mon Sep 17 00:00:00 2001 From: Zachary Vance Date: Sat, 23 Apr 2016 14:28:14 -0700 Subject: [PATCH] Test multiple cgi scripts --- cgi-bin/service.status.d/multiple cgi scripts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cgi-bin/service.status.d/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 -- 2.47.3