FAQ 10.16 - Apache log rotation

Craig Skinner craig.skinner at kepax.co.uk
Wed Jun 14 22:58:56 PDT 2006


On Sun, Jun 11, 2006 at 02:47:33PM +0200, MK wrote:
> Hello to everyone
> 
> I followed help from OpenBSD FAQ 10.16 for Apache log rotation in chroot 
> environment, but I think that in FAQ is a mistake.
> There is advised to use command: apachectl stop && apachectl start
> Try it and you get:
> 
>  sudo apachectl stop && sudo apachectl start
> /usr/sbin/apachectl stop: httpd stopped
> /usr/sbin/apachectl start: httpd (pid 27705) already running
> 
> In my opinion it must be used simple script which checks whether are httpd 
> processes really down and after that issue command for apache start. I wrote 
> it, nevertheless I'm currious why is in FAQ this statement which does not 
> work.

apachectl stop
while $(ps -p $(< /var/www/logs/httpd.pid) > /dev/null)
do
  sleep 2
done
[do something to the logs]
apachectl start



More information about the Openbsd-newbies mailing list