#!/bin/sh

# This is needed for containers that don't start nginx using init script.
install -d -m 755 -o nginx -g nginx /run/nginx || true

# Install config with the default http server to the new location (since 1.18.0-r13).
if ! [ -e /etc/nginx/http.d/default.conf ]; then
	install -m644 /usr/share/nginx/http-default_server.conf /etc/nginx/http.d/default.conf
fi

if [ ! -d /var/tmp/nginx/client_body ]; then
	mkdir -p /var/tmp/nginx/client_body
fi

if [ ! -d /var/tmp/nginx/proxy ]; then
	mkdir -p /var/tmp/nginx/proxy
fi

exit 0
