I've found that sometimes if you signal-event console-save, or other events that use the reload-httpd-admin action, from a script and especially from a script in the background (perhaps via cron) that httpd-admin does not reload but in fact dies.
The action scripts generally pass either the 'reload' or 'graceful' options to the init scripts. The 'start' and 'restart' options aren't used.
If you look at /etc/rc.d/init.d/httpd-e-smith, you will see that the 'reload' and 'graceful' option have code in them to 'start' http if the selected option fails.
If you look at /etc/rc.d/init.d/httpd-admin, you will see that that failsafe code is not there.
The reason is because a simple cut/paste from the httpd-e-smith script doesn't work. The result of the status command would always be true (ie, it would think the indicated process is running), so the start command would never fire. This is due to an oddity in the pidof command used within the status function.
However, the logic can be recoded to work more reliably in both init scripts.
In httpd-e-smith, change both occurances of:
RETVAL=$?
sleep 5
if [ $(status httpd | egrep -c '(dead|stopped)' ) == 1 ]; then
/etc/rc.d/init.d/httpd-e-smith start
fi
to:
RETVAL=$?
sleep 5
status httpd || {
echo
/etc/rc.d/init.d/httpd-e-smith start
}
In httpd-admin, add the following in the 'reload' and 'graceful' sections, changing from this line:
RETVAL=$?
to
RETVAL=$?
sleep 5
status httpd-admin || {
echo
/etc/rc.d/init.d/httpd-admin start
}
Now, both httpd-e-smith and httpd-admin should start much more reliably.
Scott