package/nginx: use /var/cache/nginx instead of /var/tmp/nginx
move http-client-body-temp-path http-proxy-temp-path http-fastcgi-temp-path http-scgi-temp-path http-uwsgi-temp-path from /var/tmp/nginx to /var/cache/nginx this allows the use of systemd constructs LogsDirectory=nginx CacheDirectory=nginx to replace ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx as there isn't a similar construct for /var/tmp. Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
b36ea68b5a
commit
856a651875
@@ -9,7 +9,7 @@ PIDFILE=/var/run/nginx.pid
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo "Starting nginx..."
|
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"
|
start-stop-daemon -S -x "$NGINX" -p "$PIDFILE"
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ NGINX_CONF_OPTS += \
|
|||||||
--group=www-data \
|
--group=www-data \
|
||||||
--error-log-path=/var/log/nginx/error.log \
|
--error-log-path=/var/log/nginx/error.log \
|
||||||
--http-log-path=/var/log/nginx/access.log \
|
--http-log-path=/var/log/nginx/access.log \
|
||||||
--http-client-body-temp-path=/var/tmp/nginx/client-body \
|
--http-client-body-temp-path=/var/cache/nginx/client-body \
|
||||||
--http-proxy-temp-path=/var/tmp/nginx/proxy \
|
--http-proxy-temp-path=/var/cache/nginx/proxy \
|
||||||
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
|
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi \
|
||||||
--http-scgi-temp-path=/var/tmp/nginx/scgi \
|
--http-scgi-temp-path=/var/cache/nginx/scgi \
|
||||||
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
|
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi
|
||||||
|
|
||||||
NGINX_CONF_OPTS += \
|
NGINX_CONF_OPTS += \
|
||||||
$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \
|
$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ After=syslog.target network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
|
LogsDirectory=nginx
|
||||||
|
CacheDirectory=nginx
|
||||||
PIDFile=/run/nginx.pid
|
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;'
|
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
|
||||||
ExecStart=/usr/sbin/nginx -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
|
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
|
||||||
|
|||||||
Reference in New Issue
Block a user