copr-backend: update logrotate config for lighttpd
This commit is contained in:
parent
18bf734ad0
commit
d03a23530d
2 changed files with 8 additions and 4 deletions
|
@ -105,6 +105,9 @@
|
|||
- name: install custom lighttpd template for directory listings
|
||||
template: src="lighttpd/dir-generator.php.j2" dest="/var/lib/copr/public_html/dir-generator.php" owner=copr group=copr mode=0755
|
||||
|
||||
- name: install custom logrotate config for lighttpd
|
||||
template: src="logrotate/lighttpd.j2" dest=/etc/logrotate.d/lighttpd owner=root group=root mode=644
|
||||
|
||||
- name: start webserver
|
||||
service: state=started enabled=yes name=lighttpd
|
||||
|
||||
|
@ -186,9 +189,6 @@
|
|||
- copy: src="cleanup_vms.sh" dest=/etc/cron.hourly/copr_cleanup_vms.sh mode=755
|
||||
when: not devel
|
||||
|
||||
- name: install lighttpd logrotate config
|
||||
copy: src="logrotate/lighttpd" dest=/etc/logrotate.d/lighttpd owner=root group=root mode=644
|
||||
|
||||
- name: setup monitoring
|
||||
import_tasks: "monitoring.yml"
|
||||
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
missingok
|
||||
notifempty
|
||||
prerotate
|
||||
/usr/bin/copr_log_hitcounter.py /var/log/lighttpd/access.log &>/var/log/copr-backend/hitcounter-logrotate.log
|
||||
{% if devel %}
|
||||
/usr/bin/copr_log_hitcounter.py /var/log/lighttpd/access.log --ignore-subnet 172.25.144.0/20 &>/var/log/copr-backend/hitcounter-logrotate.log
|
||||
{% else %}
|
||||
/usr/bin/copr_log_hitcounter.py /var/log/lighttpd/access.log --ignore-subnet 172.25.80.0/20 &>/var/log/copr-backend/hitcounter-logrotate.log
|
||||
{% endif %}
|
||||
endscript
|
||||
postrotate
|
||||
/usr/bin/killall -HUP lighttpd &>/dev/null || :
|
Loading…
Add table
Add a link
Reference in a new issue