Saltstack Official Nginx 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.

21 line
558B

  1. # {{ pillar.get('message_do_not_modify', '') }}
  2. # startup script for Nginx loggers
  3. start on starting nginx
  4. stop on runlevel [!2345]
  5. respawn
  6. pre-start script
  7. if [ ! -r /var/log/nginx/{{ type }}.fifo ]; then
  8. mkdir -p /var/log/nginx
  9. mkfifo /var/log/nginx/{{ type }}.fifo
  10. chown root.root /var/log/nginx/{{ type }}.fifo
  11. chmod 660 /var/log/nginx/{{ type }}.fifo
  12. fi
  13. end script
  14. emits nginx-logger-{{ type }}
  15. exec logger -f /var/log/nginx/{{ type }}.fifo -t nginx -p {% if type == 'error' %}warn{% else %}debug{% endif %}