Forum Moderators: phranque
DIR="YOUR HTTPD STARTUP DIRECTORY"
httpd -k $command -D $DIR -f $DIR/conf/httpd.conf
if [ "$command" = "start" ]
then
pidfile=`grep '^[ ]*PidFile[ ]*' $DIR/conf/httpd.conf ¦ awk '{ print $2 }'`
while [! -s $pidfile ]
do
sleep 1
done
pid=`cat $pidfile`
while true && [ -f $pidfile ]
do
if /bin/kill -0 $pid
then
sleep 5
continue
fi
if [ -f $pidfile ]
then
httpd -k stop -D $DIR -f $DIR/conf/httpd.conf
sleep 2
httpd -k start -D $DIR -f $DIR/conf/httpd.conf
while [! -s $pidfile ]
do
sleep 1
done
pid=`cat $pidfile`
fi
done
fi