#!/bin/sh

# Fail if there are no options provided
test -n "$ACCESS_LOGS_FLAGS" || exit 1

# Give write access to Nginx
umask 007

# Read from fifo and load into database
daemonize -p /run/access_logd.pid -u nobody \
  /usr/bin/access_log $ACCESS_LOGS_FLAGS
