nginx-formula/templates/upstart-logger.jinja
David Czarnecki 14310ff263 Fix a filename and pillar key issue
* Ensure `common.sls` references correct template filename
* Use `pillar.get(...)` for message_do_not_modify with default
2013-09-25 16:53:32 -04:00

20 lines
526 B
Django/Jinja

# {{ pillar.get('message_do_not_modify', '') }}
# startup script for Nginx loggers
start on starting nginx
stop on runlevel [!2345]
respawn
pre-start script
if [ ! -r /var/log/nginx/{{ type }}.fifo ]; then
mkfifo /var/log/nginx/{{ type }}.fifo
chown root.root /var/log/nginx/{{ type }}.fifo
chmod 660 /var/log/nginx/{{ type }}.fifo
fi
end script
emits nginx-logger-{{ type }}
exec logger -f /var/log/nginx/{{ type }}.fifo -t nginx -p {% if type == 'error' %}warn{% else %}debug{% endif %}