Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | From 94a9e2241ea27e75babbfdeb38043b13049e23b0 Mon Sep 17 00:00:00 2001 |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 2 | From: Yulong Pei <Yulong.pei@windriver.com> |
| 3 | Date: Thu, 1 Sep 2011 01:03:14 +0800 |
| 4 | Subject: [PATCH] replace lynx to curl in apachectl script |
| 5 | |
| 6 | Upstream-Status: Inappropriate [configuration] |
| 7 | |
| 8 | Signed-off-by: Yulong Pei <Yulong.pei@windriver.com> |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 9 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 10 | --- |
| 11 | support/apachectl.in | 14 ++++++++++---- |
| 12 | 1 file changed, 10 insertions(+), 4 deletions(-) |
| 13 | |
| 14 | diff --git a/support/apachectl.in b/support/apachectl.in |
| 15 | index 3281c2e..6ab4ba5 100644 |
| 16 | --- a/support/apachectl.in |
| 17 | +++ b/support/apachectl.in |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | @@ -52,11 +52,11 @@ fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 19 | # a command that outputs a formatted text version of the HTML at the |
| 20 | # url given on the command line. Designed for lynx, however other |
| 21 | # programs may work. |
| 22 | -LYNX="@LYNX_PATH@ -dump" |
| 23 | +CURL="/usr/bin/curl" |
| 24 | # |
| 25 | # the URL to your server's mod_status status page. If you do not |
| 26 | # have one, then status and fullstatus will not work. |
| 27 | -STATUSURL="http://localhost:@PORT@/server-status" |
| 28 | +STATUSURL="http://localhost:@PORT@/" |
| 29 | # |
| 30 | # Set this variable to a command that increases the maximum |
| 31 | # number of file descriptors allowed per child process. This is |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 32 | @@ -92,10 +92,16 @@ configtest) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 33 | ERROR=$? |
| 34 | ;; |
| 35 | status) |
| 36 | - $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } ' |
| 37 | + $CURL -s $STATUSURL | grep -o "It works!" |
| 38 | + if [ $? != 0 ] ; then |
| 39 | + echo The httpd server does not work! |
| 40 | + fi |
| 41 | ;; |
| 42 | fullstatus) |
| 43 | - $LYNX $STATUSURL |
| 44 | + $CURL -s $STATUSURL | grep -o "It works!" |
| 45 | + if [ $? != 0 ] ; then |
| 46 | + echo The httpd server does not work! |
| 47 | + fi |
| 48 | ;; |
| 49 | *) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 50 | $HTTPD "$@" |