Saltstack Official Apache Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
747B

  1. {% from "apache/map.jinja" import apache with context %}
  2. {{ apache.logrotatedir }}:
  3. file:
  4. - managed
  5. - contents: |
  6. {{ apache.logdir }}/*.log {
  7. daily
  8. missingok
  9. rotate 14
  10. compress
  11. delaycompress
  12. notifempty
  13. create 640 root adm
  14. sharedscripts
  15. postrotate
  16. if /etc/init.d/{{ apache.service }} status > /dev/null ; then \
  17. /etc/init.d/{{ apache.service }} reload > /dev/null; \
  18. fi;
  19. endscript
  20. prerotate
  21. if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
  22. run-parts /etc/logrotate.d/httpd-prerotate; \
  23. fi; \
  24. endscript
  25. }