how to restart Apache consistantly

Giganews Newsgroups
Subject: how to restart Apache consistantly
Posted by:  mdudley (mdudl…
Date: Wed, 9 Sep 2009

Sorry if this is not the right newsgroup, but it is the only apache
newsgroup available.

I have a scrip that runs every night.  It moves and zips up logs on a
number of virtual servers. Each time it does this it does a restart of
Apache using:

kill -USR1 `cat /var/run/

Unfortunately about 1% of the time Apache will error out on the
restart and the not be loaded, resulting in the server being down the
rest of the night.  I would like to use the restart command for
Apache, which will start it if it is not already running. That way the
most it will be down is the few minutes it takes to gzip up the log
file and go to the next one to process.  However I cannot find a
"restartssl" command.  The server is using ssl, and if it restarts
successfully that is fine, but the way I read the options, a restart
will start without ssl if it is not running already.

How do I do a restart that will do a startssl if not already loaded
instead of a start?