[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r10298 - in /man-cgi/extra: ./ test-manpages.sh



Author: jfs
Date: Wed Oct 30 02:13:36 2013
New Revision: 10298

URL: http://svn.debian.org/wsvn/?sc=1&rev=10298
Log:
Extra files for manpages archive

Added:
    man-cgi/extra/
    man-cgi/extra/test-manpages.sh

Added: man-cgi/extra/test-manpages.sh
URL: http://svn.debian.org/wsvn/man-cgi/extra/test-manpages.sh?rev=10298&op=file
==============================================================================
--- man-cgi/extra/test-manpages.sh	(added)
+++ man-cgi/extra/test-manpages.sh	Wed Oct 30 02:13:36 2013
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+#HOST="manpages.debian.net"
+HOST="manpages.debian.org"
+
+if  [ ! -e /bin/nc ] ; then
+    echo "ERROR: Netcat not found at /bin/nc. Please install it"
+    exit 1
+fi
+
+test_url () {
+	DESC=$1
+	URL=$2
+	echo "Testing access to $DESC ($URL)"
+	echo "_____________________________________________________________________"
+	/bin/echo -e "GET ${URL} HTTP/1.1\r\nHost: ${HOST}\r\nConnection: close\r\n\r\n" | nc localhost 80
+	return $?
+}
+
+test_url "root page" http://manpages.debian.net/
+echo "_____________________________________________________________________"
+test_url "index page" http://manpages.debian.net/index.html
+echo "_____________________________________________________________________"
+test_url "error page" http://manpages.debian.net/does_not_exist
+echo "_____________________________________________________________________"
+test_url "Man.cgi interface" http://manpages.debian.net/cgi-bin/man.cgi
+echo "_____________________________________________________________________"
+
+exit 0


Reply to: