Skip to content

Commit 83289dd

Browse files
author
Ryan Bloom
committed
Make the error messages from apachectl refer to the actual name of the
executable, not "httpd". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91409 13f79535-47bb-0310-9956-ffa450edef68
1 parent ffc887a commit 83289dd

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

support/apachectl.in

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# -------------------- --------------------
2626
#
2727
# the path to your PID file
28-
PIDFILE=@prefix@/logs/httpd.pid
28+
PIDFILE=@prefix@/logs/@progname@.pid
2929
#
3030
# the path to your httpd binary, including options if necessary
3131
HTTPD='@prefix@/bin/@progname@'
@@ -54,27 +54,27 @@ do
5454
if [ -f $PIDFILE ] ; then
5555
PID=`cat $PIDFILE`
5656
if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then
57-
STATUS="httpd (pid $PID) running"
57+
STATUS="@progname@ (pid $PID) running"
5858
RUNNING=1
5959
else
60-
STATUS="httpd (pid $PID?) not running"
60+
STATUS="@progname@ (pid $PID?) not running"
6161
RUNNING=0
6262
fi
6363
else
64-
STATUS="httpd (no pid file) not running"
64+
STATUS="@progname@ (no pid file) not running"
6565
RUNNING=0
6666
fi
6767

6868
case $ARG in
6969
start)
7070
if [ $RUNNING -eq 1 ]; then
71-
echo "$0 $ARG: httpd (pid $PID) already running"
71+
echo "$0 $ARG: @progname@ (pid $PID) already running"
7272
continue
7373
fi
7474
if $HTTPD ; then
75-
echo "$0 $ARG: httpd started"
75+
echo "$0 $ARG: @progname@ started"
7676
else
77-
echo "$0 $ARG: httpd could not be started"
77+
echo "$0 $ARG: @progname@ could not be started"
7878
ERROR=3
7979
fi
8080
;;
@@ -84,27 +84,27 @@ do
8484
continue
8585
fi
8686
if kill $PID ; then
87-
echo "$0 $ARG: httpd stopped"
87+
echo "$0 $ARG: @progname@ stopped"
8888
else
89-
echo "$0 $ARG: httpd could not be stopped"
89+
echo "$0 $ARG: @progname@ could not be stopped"
9090
ERROR=4
9191
fi
9292
;;
9393
restart)
9494
if [ $RUNNING -eq 0 ]; then
95-
echo "$0 $ARG: httpd not running, trying to start"
95+
echo "$0 $ARG: @progname@ not running, trying to start"
9696
if $HTTPD ; then
97-
echo "$0 $ARG: httpd started"
97+
echo "$0 $ARG: @progname@ started"
9898
else
99-
echo "$0 $ARG: httpd could not be started"
99+
echo "$0 $ARG: @progname@ could not be started"
100100
ERROR=5
101101
fi
102102
else
103103
if $HTTPD -t >/dev/null 2>&1; then
104104
if kill -HUP $PID ; then
105-
echo "$0 $ARG: httpd restarted"
105+
echo "$0 $ARG: @progname@ restarted"
106106
else
107-
echo "$0 $ARG: httpd could not be restarted"
107+
echo "$0 $ARG: @progname@ could not be restarted"
108108
ERROR=6
109109
fi
110110
else
@@ -116,19 +116,19 @@ do
116116
;;
117117
graceful)
118118
if [ $RUNNING -eq 0 ]; then
119-
echo "$0 $ARG: httpd not running, trying to start"
119+
echo "$0 $ARG: @progname@ not running, trying to start"
120120
if $HTTPD ; then
121-
echo "$0 $ARG: httpd started"
121+
echo "$0 $ARG: @progname@ started"
122122
else
123-
echo "$0 $ARG: httpd could not be started"
123+
echo "$0 $ARG: @progname@ could not be started"
124124
ERROR=5
125125
fi
126126
else
127127
if $HTTPD -t >/dev/null 2>&1; then
128128
if kill -@AP_SIG_GRACEFUL_SHORT@ $PID ; then
129-
echo "$0 $ARG: httpd gracefully restarted"
129+
echo "$0 $ARG: @progname@ gracefully restarted"
130130
else
131-
echo "$0 $ARG: httpd could not be restarted"
131+
echo "$0 $ARG: @progname@ could not be restarted"
132132
ERROR=7
133133
fi
134134
else
@@ -155,9 +155,9 @@ do
155155
echo "usage: $0 (start|stop|restart|fullstatus|status|graceful|configtest|help)"
156156
cat <<EOF
157157
158-
start - start httpd
159-
stop - stop httpd
160-
restart - restart httpd if running by sending a SIGHUP or start if
158+
start - start @progname@
159+
stop - stop @progname@
160+
restart - restart @progname@ if running by sending a SIGHUP or start if
161161
not running
162162
fullstatus - dump a full status screen; requires lynx and mod_status enabled
163163
status - dump a short status screen; requires lynx and mod_status enabled

0 commit comments

Comments
 (0)