Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | From 760ccbb2fb046621a2aeaecabb2b1ef9aa280cf1 Mon Sep 17 00:00:00 2001 |
| 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> |
| 9 | --- |
| 10 | support/apachectl.in | 14 ++++++++++---- |
| 11 | 1 files changed, 10 insertions(+), 4 deletions(-) |
| 12 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 13 | Index: httpd-2.4.29/support/apachectl.in |
| 14 | =================================================================== |
| 15 | --- httpd-2.4.29.orig/support/apachectl.in |
| 16 | +++ httpd-2.4.29/support/apachectl.in |
| 17 | @@ -52,11 +52,11 @@ fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 18 | # a command that outputs a formatted text version of the HTML at the |
| 19 | # url given on the command line. Designed for lynx, however other |
| 20 | # programs may work. |
| 21 | -LYNX="@LYNX_PATH@ -dump" |
| 22 | +CURL="/usr/bin/curl" |
| 23 | # |
| 24 | # the URL to your server's mod_status status page. If you do not |
| 25 | # have one, then status and fullstatus will not work. |
| 26 | -STATUSURL="http://localhost:@PORT@/server-status" |
| 27 | +STATUSURL="http://localhost:@PORT@/" |
| 28 | # |
| 29 | # Set this variable to a command that increases the maximum |
| 30 | # number of file descriptors allowed per child process. This is |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 31 | @@ -92,10 +92,16 @@ configtest) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 32 | ERROR=$? |
| 33 | ;; |
| 34 | status) |
| 35 | - $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } ' |
| 36 | + $CURL -s $STATUSURL | grep -o "It works!" |
| 37 | + if [ $? != 0 ] ; then |
| 38 | + echo The httpd server does not work! |
| 39 | + fi |
| 40 | ;; |
| 41 | fullstatus) |
| 42 | - $LYNX $STATUSURL |
| 43 | + $CURL -s $STATUSURL | grep -o "It works!" |
| 44 | + if [ $? != 0 ] ; then |
| 45 | + echo The httpd server does not work! |
| 46 | + fi |
| 47 | ;; |
| 48 | *) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 49 | $HTTPD "$@" |