copr-be: work-around lighty+cronolog+logrotate
Relates: https://pagure.io/copr/copr/issue/2001
This commit is contained in:
parent
f4e09eac78
commit
a10a07f0ef
1 changed files with 20 additions and 21 deletions
|
@ -4,25 +4,24 @@
|
||||||
# would call hitcounter too on an empty file.
|
# would call hitcounter too on an empty file.
|
||||||
#
|
#
|
||||||
# Note that lighttpd server runs with max-workers, and thus we pipe the access
|
# Note that lighttpd server runs with max-workers, and thus we pipe the access
|
||||||
# logs through cronolog to the access.log. It doesn't make sense to -HUP
|
# logs through cronolog to the access.log. So we send -HUP to Lighty (leads to
|
||||||
# Lighty, because then it doesn't restart cronolog. We need to -HUP the
|
# file-descriptor refresh on error.log, but doesn't restart cronolog process),
|
||||||
# cronolog directly (which is fortunately re-started by Lighty/mod_accesslog).
|
# and we also send -HUP to cronolog process (which is fortunately re-started by
|
||||||
|
# Lighty/mod_accesslog).
|
||||||
|
|
||||||
## /var/log/lighttpd/*.log {
|
/var/log/lighttpd/*log {
|
||||||
## rotate 5
|
rotate 5
|
||||||
## daily
|
daily
|
||||||
## missingok
|
missingok
|
||||||
## notifempty
|
notifempty
|
||||||
## compress
|
compress
|
||||||
## sharedscripts
|
delaycompress
|
||||||
## prerotate
|
sharedscripts
|
||||||
## {% if devel %}
|
prerotate
|
||||||
## /usr/bin/copr_log_hitcounter.py /var/log/lighttpd/access.log --ignore-subnets 172.25.144.0/20 209.132.184.33/24 &>>/var/log/copr-backend/hitcounter-logrotate.log || :
|
/usr/bin/copr_log_hitcounter.py /var/log/lighttpd/access.log --ignore-subnets 172.25.144.0/20 209.132.184.33/24 &>>/var/log/copr-backend/hitcounter-logrotate.log || :
|
||||||
## {% else %}
|
endscript
|
||||||
## /usr/bin/copr_log_hitcounter.py /var/log/lighttpd/access.log --ignore-subnets 172.25.80.0/20 209.132.184.33/24 &>>/var/log/copr-backend/hitcounter-logrotate.log || :
|
postrotate
|
||||||
## {% endif %}
|
/usr/bin/killall -HUP lighttpd &>/dev/null || :
|
||||||
## endscript
|
/usr/bin/killall -HUP cronolog &>/dev/null || :
|
||||||
## postrotate
|
endscript
|
||||||
## /usr/bin/killall -HUP cronolog &>>/var/log/copr-backend/cronolog-restart.log || :
|
}
|
||||||
## endscript
|
|
||||||
## }
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue