- spec file cleanups: provide httpd-suexec, mod_dav; don't obsolete mod_jk;
drop trailing dots from Summaries - init script add LSB info header, support force-reload (#246944) update description drop 1.3 config check pass $pidfile to daemon and pidfile everywhere
This commit is contained in:
parent
705c217da1
commit
935b9586c4
41
httpd.init
41
httpd.init
@ -3,12 +3,22 @@
|
|||||||
# httpd Startup script for the Apache HTTP Server
|
# httpd Startup script for the Apache HTTP Server
|
||||||
#
|
#
|
||||||
# chkconfig: - 85 15
|
# chkconfig: - 85 15
|
||||||
# description: Apache is a World Wide Web server. It is used to serve \
|
# description: The Apache HTTP Server is an efficient and extensible \
|
||||||
# HTML files and CGI.
|
# server implementing the current HTTP standards.
|
||||||
# processname: httpd
|
# processname: httpd
|
||||||
# config: /etc/httpd/conf/httpd.conf
|
# config: /etc/httpd/conf/httpd.conf
|
||||||
# config: /etc/sysconfig/httpd
|
# config: /etc/sysconfig/httpd
|
||||||
# pidfile: /var/run/httpd.pid
|
# pidfile: /var/run/httpd.pid
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: httpd
|
||||||
|
# Required-Start: $local_fs $remote_fs $network $named
|
||||||
|
# Required-Stop: $local_fs $remote_fs $network
|
||||||
|
# Should-Start: distcache
|
||||||
|
# Short-Description: start and stop Apache HTTP Server
|
||||||
|
# Description: The Apache HTTP Server is an extensible server
|
||||||
|
# implementing the current HTTP standards.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
# Source function library.
|
# Source function library.
|
||||||
. /etc/rc.d/init.d/functions
|
. /etc/rc.d/init.d/functions
|
||||||
@ -36,30 +46,13 @@ pidfile=${PIDFILE-/var/run/httpd.pid}
|
|||||||
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
|
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|
||||||
# check for 1.3 configuration
|
|
||||||
check13 () {
|
|
||||||
CONFFILE=/etc/httpd/conf/httpd.conf
|
|
||||||
GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
|
|
||||||
GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
|
|
||||||
GONE="${GONE}AccessConfig|ResourceConfig)"
|
|
||||||
if LANG=C grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
|
|
||||||
echo
|
|
||||||
echo 1>&2 " Apache 1.3 configuration directives found"
|
|
||||||
echo 1>&2 " please read @docdir@/migration.html"
|
|
||||||
failure "Apache 1.3 config directives test"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# The semantics of these two functions differ from the way apachectl does
|
# The semantics of these two functions differ from the way apachectl does
|
||||||
# things -- attempting to start while running is a failure, and shutdown
|
# things -- attempting to start while running is a failure, and shutdown
|
||||||
# when not running is also a failure. So we just do it the way init scripts
|
# when not running is also a failure. So we just do it the way init scripts
|
||||||
# are expected to behave here.
|
# are expected to behave here.
|
||||||
start() {
|
start() {
|
||||||
echo -n $"Starting $prog: "
|
echo -n $"Starting $prog: "
|
||||||
check13 || exit 1
|
LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $httpd $OPTIONS
|
||||||
LANG=$HTTPD_LANG daemon $httpd $OPTIONS
|
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
echo
|
echo
|
||||||
[ $RETVAL = 0 ] && touch ${lockfile}
|
[ $RETVAL = 0 ] && touch ${lockfile}
|
||||||
@ -71,7 +64,7 @@ start() {
|
|||||||
# errant children.
|
# errant children.
|
||||||
stop() {
|
stop() {
|
||||||
echo -n $"Stopping $prog: "
|
echo -n $"Stopping $prog: "
|
||||||
killproc -d 10 $httpd
|
killproc -p ${pidfile} -d 10 $httpd
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
echo
|
echo
|
||||||
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
|
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
|
||||||
@ -83,7 +76,7 @@ reload() {
|
|||||||
echo $"not reloading due to configuration syntax error"
|
echo $"not reloading due to configuration syntax error"
|
||||||
failure $"not reloading $httpd due to configuration syntax error"
|
failure $"not reloading $httpd due to configuration syntax error"
|
||||||
else
|
else
|
||||||
killproc $httpd -HUP
|
killproc -p ${pidfile} $httpd -HUP
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
@ -111,7 +104,7 @@ case "$1" in
|
|||||||
start
|
start
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
reload)
|
force-reload|reload)
|
||||||
reload
|
reload
|
||||||
;;
|
;;
|
||||||
graceful|help|configtest|fullstatus)
|
graceful|help|configtest|fullstatus)
|
||||||
@ -120,7 +113,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
|
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
|
||||||
exit 1
|
RETVAL=3
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit $RETVAL
|
exit $RETVAL
|
||||||
|
18
httpd.spec
18
httpd.spec
@ -6,7 +6,7 @@
|
|||||||
Summary: Apache HTTP Server
|
Summary: Apache HTTP Server
|
||||||
Name: httpd
|
Name: httpd
|
||||||
Version: 2.2.4
|
Version: 2.2.4
|
||||||
Release: 4
|
Release: 5
|
||||||
URL: http://httpd.apache.org/
|
URL: http://httpd.apache.org/
|
||||||
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
|
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
|
||||||
Source1: index.html
|
Source1: index.html
|
||||||
@ -47,9 +47,10 @@ Obsoletes: httpd-suexec
|
|||||||
Requires(pre): /usr/sbin/useradd
|
Requires(pre): /usr/sbin/useradd
|
||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
Provides: webserver
|
Provides: webserver
|
||||||
|
Provides: mod_dav = %{version}-%{release}, httpd-suexec = %{version}-%{release}
|
||||||
Provides: httpd-mmn = %{mmn}
|
Provides: httpd-mmn = %{mmn}
|
||||||
Obsoletes: apache, secureweb, mod_dav, mod_gzip, stronghold-apache, stronghold-htdocs
|
Obsoletes: apache, secureweb, mod_dav, mod_gzip, stronghold-apache
|
||||||
Obsoletes: mod_put, mod_roaming, mod_jk
|
Obsoletes: stronghold-htdocs, mod_put, mod_roaming
|
||||||
Conflicts: pcre < 4.0
|
Conflicts: pcre < 4.0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -74,7 +75,7 @@ to install this package.
|
|||||||
|
|
||||||
%package manual
|
%package manual
|
||||||
Group: Documentation
|
Group: Documentation
|
||||||
Summary: Documentation for the Apache HTTP server.
|
Summary: Documentation for the Apache HTTP server
|
||||||
Requires: httpd = %{version}-%{release}
|
Requires: httpd = %{version}-%{release}
|
||||||
Obsoletes: secureweb-manual, apache-manual
|
Obsoletes: secureweb-manual, apache-manual
|
||||||
|
|
||||||
@ -461,6 +462,15 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/httpd/build/*.sh
|
%{_libdir}/httpd/build/*.sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 24 2007 Joe Orton <jorton@redhat.com> 2.2.4-5
|
||||||
|
- spec file cleanups: provide httpd-suexec, mod_dav;
|
||||||
|
don't obsolete mod_jk; drop trailing dots from Summaries
|
||||||
|
- init script
|
||||||
|
* add LSB info header, support force-reload (#246944)
|
||||||
|
* update description
|
||||||
|
* drop 1.3 config check
|
||||||
|
* pass $pidfile to daemon and pidfile everywhere
|
||||||
|
|
||||||
* Wed May 9 2007 Joe Orton <jorton@redhat.com> 2.2.4-4
|
* Wed May 9 2007 Joe Orton <jorton@redhat.com> 2.2.4-4
|
||||||
- update welcome page branding
|
- update welcome page branding
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user