Apache stops after logrotate!
Ok, here is my problem.Recenty I setuped logrotate twice per day: at 5am and 5pm.
Here is an apache logrotate config:
PHP Code:
/home/www/www1/logs/access_log {
size 100M
nocompress
rotate 2
postrotate
/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}
ofcourse the first thing I tried is to restart apache:
PHP Code:
/usr/local/apache/bin/apachectl stop
/usr/local/apache/bin/apachectl stop: httpd stopped
/usr/local/apache/bin/apachectl start
/usr/local/apache/bin/apachectl start: httpd (pid 991) already running
it start working when i manually killing this one httpd process and doing apachectl stop, start again.
So what should I do to not crashing apache after logrotate?
Thanks!