case "$1" in
start)
echo "Starting nginx..."
- mkdir -p /var/log/nginx /var/tmp/nginx
+ mkdir -p /var/log/nginx /var/cache/nginx
start-stop-daemon -S -x "$NGINX" -p "$PIDFILE"
;;
stop)
--group=www-data \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
- --http-client-body-temp-path=/var/tmp/nginx/client-body \
- --http-proxy-temp-path=/var/tmp/nginx/proxy \
- --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
- --http-scgi-temp-path=/var/tmp/nginx/scgi \
- --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
+ --http-client-body-temp-path=/var/cache/nginx/client-body \
+ --http-proxy-temp-path=/var/cache/nginx/proxy \
+ --http-fastcgi-temp-path=/var/cache/nginx/fastcgi \
+ --http-scgi-temp-path=/var/cache/nginx/scgi \
+ --http-uwsgi-temp-path=/var/cache/nginx/uwsgi
NGINX_CONF_OPTS += \
$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \
[Service]
Type=forking
+LogsDirectory=nginx
+CacheDirectory=nginx
PIDFile=/run/nginx.pid
-ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload