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.

20 lines
526B

  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. mkfifo /var/log/nginx/{{ type }}.fifo
  9. chown root.root /var/log/nginx/{{ type }}.fifo
  10. chmod 660 /var/log/nginx/{{ type }}.fifo
  11. fi
  12. end script
  13. emits nginx-logger-{{ type }}
  14. exec logger -f /var/log/nginx/{{ type }}.fifo -t nginx -p {% if type == 'error' %}warn{% else %}debug{% endif %}