SHA256
1
0
forked from pool/apache2
OBS User unknown
2008-04-20 19:03:37 +00:00
committed by Git OBS Bridge
parent d4a6a9907c
commit 9c1a724576
11 changed files with 248 additions and 996 deletions

View File

@@ -14,7 +14,7 @@
### BEGIN INIT INFO
# Provides: apache2 httpd2
# Required-Start: $local_fs $remote_fs $network
# X-UnitedLinux-Should-Start: $named $time postgresql sendmail mysql ypclient dhcp radiusd
# Should-Start: $named $time postgresql sendmail mysql ypclient dhcp radiusd
# Required-Stop: $local_fs $remote_fs $network
# X-UnitedLinux-Should-Stop:
# Default-Start: 3 5
@@ -172,6 +172,31 @@ case "$action" in
esac
fi
rc_status -v
;;
stop-graceful)
echo "Shutting down httpd2 gracefully (SIGWINCH)"
if ! [ -f $pidfile ]; then
echo -n "(not running)"
else
pid=$(<$pidfile)
kill -WINCH $pid 2>/dev/null
case $? in
1) echo -n "(not running)";;
0) # wait until the pidfile is gone. The parent stays there, but closes the listen ports.
echo -n "(waiting for parent to close listen ports and remove pidfile) "
for ((wait=0; wait<120; wait++)); do
if test -f $pidfile; then
usleep 500000
continue
else
break
fi
done
;;
esac
fi
rc_status -v
;;
try-restart)
@@ -209,6 +234,18 @@ case "$action" in
# Remember status and be quiet
rc_status -v
;;
restart-graceful)
$0 configtest "$@" || { rc_failed $?; rc_exit; }
if $0 status &>/dev/null; then
$0 stop-graceful "$@"
$0 start "$@"
else
$0 start "$@"
fi
# Remember status and be quiet
rc_status
;;
reload|force-reload|graceful)
echo -n "Reload httpd2 (graceful restart)"
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
@@ -294,13 +331,18 @@ case "$action" in
where <command> is one of:
start - start httpd
startssl - start httpd with -DSSL
stop - stop httpd (sendign SIGTERM to parent)
stop - stop httpd (sending SIGTERM to parent)
try-restart - stop httpd and if this succeeds (i.e. if
it was running before), start it again.
status - check whether httpd is running
restart - stop httpd if running; start httpd
reload|graceful - do a graceful restart by sending a SIGUSR1 or
restart-graceful - stop httpd gracefully if running; start httpd
reload|graceful - do a graceful restart by sending a SIGUSR1, or
start if not running
stop-graceful - stop httpd (sending SIGWINCH to parent)
configtest - do a configuration syntax test
extreme-configtest - try to run httpd as nobody (detects more errors
by actually loading the configuration, but cannot
@@ -308,10 +350,12 @@ case "$action" in
probe - probe for the necessity of a reload, give
out the argument which is required for a reload.
(by comparing conf files with pidfile timestamp)
full-server-status - dump a full status screen; requires lynx or w3m
and mod_status enabled
server-status - dump a short status screen; requires lynx or w3m
and mod_status enabled
help - this screen
optional server flags are passed through to httpd.