blob: 020f1d7979a810a9e3ee73b49762eb0bee41931d [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 94a9e2241ea27e75babbfdeb38043b13049e23b0 Mon Sep 17 00:00:00 2001
Patrick Williamsb48b7b42016-08-17 15:04:38 -05002From: Yulong Pei <Yulong.pei@windriver.com>
3Date: Thu, 1 Sep 2011 01:03:14 +0800
4Subject: [PATCH] replace lynx to curl in apachectl script
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by: Yulong Pei <Yulong.pei@windriver.com>
Patrick Williamsb48b7b42016-08-17 15:04:38 -05009
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080010---
11 support/apachectl.in | 14 ++++++++++----
12 1 file changed, 10 insertions(+), 4 deletions(-)
13
14diff --git a/support/apachectl.in b/support/apachectl.in
15index 3281c2e..6ab4ba5 100644
16--- a/support/apachectl.in
17+++ b/support/apachectl.in
Brad Bishop316dfdd2018-06-25 12:45:53 -040018@@ -52,11 +52,11 @@ fi
Patrick Williamsb48b7b42016-08-17 15:04:38 -050019 # 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 Bishop316dfdd2018-06-25 12:45:53 -040032@@ -92,10 +92,16 @@ configtest)
Patrick Williamsb48b7b42016-08-17 15:04:38 -050033 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 Bishop316dfdd2018-06-25 12:45:53 -040050 $HTTPD "$@"