2013-09-25 22:53:32 +02:00
|
|
|
# {{ pillar.get('message_do_not_modify', '') }}
|
2013-08-21 21:01:51 +02:00
|
|
|
# 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 %}
|