Commit 8ffb70f8 authored by Leigh Stoller's avatar Leigh Stoller

Fixes for apache22 ...

parent 28e0f9ea
#! /bin/sh #! /bin/sh
# #
# Copyright (c) 2001-2006 University of Utah and the Flux Group. # Copyright (c) 2001-2013 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
# CONSTANTS INIT # CONSTANTS INIT
PIDFILE=/var/run/apache.pid PIDFILE=/var/run/apache.pid
ALTPIDFILE=/var/run/httpd.pid
LOGDIR=/usr/testbed/log LOGDIR=/usr/testbed/log
DESTDIR=/z/testbed/logs/apache DESTDIR=/z/testbed/logs/apache
APACHECTL=/usr/local/sbin/apachectl APACHECTL=/usr/local/sbin/apachectl
...@@ -70,11 +71,20 @@ done ...@@ -70,11 +71,20 @@ done
# #
if [ $MOVED -eq 1 ] if [ $MOVED -eq 1 ]
then then
mypid=""
if [ -e $PIDFILE ]
then
mypid=`cat $PIDFILE`
elif [ -e $ALTPIDFILE ]
then
mypid=`cat $ALTPIDFILE`
fi
# Should be a proc entry if the process is running! # Should be a proc entry if the process is running!
# Note that a graceful restart waits for all clients to disconnect. # Note that a graceful restart waits for all clients to disconnect.
if [ -e /proc/`cat $PIDFILE` ] if [ "x$mypid" != "x" -a -e "/proc/$mypid" ]
then then
$APACHECTL graceful $APACHECTL restart
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "Apache restart failed" echo "Apache restart failed"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment