mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 10:57:07 -08:00
www-servers/nginx: fix directory path to pid file
Closes: https://bugs.gentoo.org/939560 Signed-off-by: Alexander Lopatin <alopatindev@codonaft.com> Closes: https://github.com/gentoo/gentoo/pull/38593 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
# PID file
|
||||
# If you should ever change this, remember to update
|
||||
# "/etc/logrotate.d/nginx", too.
|
||||
#NGINX_PIDFILE="/run/nginx.pid"
|
||||
#NGINX_PIDFILE="/run/nginx/nginx.pid"
|
||||
|
||||
# User to run nginx as
|
||||
# If you should ever change this, make sure this user has
|
||||
@@ -30,3 +30,6 @@
|
||||
# that the service will be terminated within a given time (60 + 5 seconds
|
||||
# per default) when you are stopping the service.
|
||||
#NGINX_TERMTIMEOUT="TERM/60/KILL/5"
|
||||
|
||||
# Run master process as user (requires configuration with setcap)
|
||||
#command_user="${NGINX_USER:-nginx}"
|
||||
|
||||
@@ -15,7 +15,7 @@ NGINX_CONFIGFILE=${NGINX_CONFIGFILE:-/etc/nginx/nginx.conf}
|
||||
command="/usr/sbin/nginx"
|
||||
command_args="-c \"${NGINX_CONFIGFILE}\""
|
||||
start_stop_daemon_args=${NGINX_SSDARGS:-"--wait 1000"}
|
||||
pidfile=${NGINX_PIDFILE:-/run/nginx.pid}
|
||||
pidfile=${NGINX_PIDFILE:-/run/nginx/nginx.pid}
|
||||
user=${NGINX_USER:-nginx}
|
||||
group=${NGINX_GROUP:-nginx}
|
||||
retry=${NGINX_TERMTIMEOUT:-"TERM/60/KILL/5"}
|
||||
@@ -26,6 +26,8 @@ depend() {
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
mkdir -m 0775 -p "/run/nginx"
|
||||
chown -R "${user}:${group}" "/run/nginx"
|
||||
if [ "${RC_CMD}" != "restart" ]; then
|
||||
configtest || return 1
|
||||
fi
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
delaycompress
|
||||
sharedscripts
|
||||
postrotate
|
||||
test -r /run/nginx.pid && kill -USR1 `cat /run/nginx.pid`
|
||||
test -r /run/nginx/nginx.pid && kill -USR1 `cat /run/nginx/nginx.pid`
|
||||
endscript
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ After=network.target remote-fs.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/nginx.pid
|
||||
PIDFile=/run/nginx/nginx.pid
|
||||
ExecStartPre=/usr/sbin/nginx -t
|
||||
ExecStart=/usr/sbin/nginx
|
||||
ExecStartPost=/bin/sleep 0.1
|
||||
|
||||
@@ -710,7 +710,7 @@ src_configure() {
|
||||
--prefix="${EPREFIX}"/usr \
|
||||
--conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \
|
||||
--error-log-path="${EPREFIX}"/var/log/${PN}/error_log \
|
||||
--pid-path="${EPREFIX}"/run/${PN}.pid \
|
||||
--pid-path="${EPREFIX}"/run/${PN}/${PN}.pid \
|
||||
--lock-path="${EPREFIX}"/run/lock/${PN}.lock \
|
||||
--with-cc-opt="-I${ESYSROOT}/usr/include" \
|
||||
--with-ld-opt="-L${ESYSROOT}/usr/$(get_libdir)" \
|
||||
|
||||
@@ -710,7 +710,7 @@ src_configure() {
|
||||
--prefix="${EPREFIX}"/usr \
|
||||
--conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \
|
||||
--error-log-path="${EPREFIX}"/var/log/${PN}/error_log \
|
||||
--pid-path="${EPREFIX}"/run/${PN}.pid \
|
||||
--pid-path="${EPREFIX}"/run/${PN}/${PN}.pid \
|
||||
--lock-path="${EPREFIX}"/run/lock/${PN}.lock \
|
||||
--with-cc-opt="-I${ESYSROOT}/usr/include" \
|
||||
--with-ld-opt="-L${ESYSROOT}/usr/$(get_libdir)" \
|
||||
|
||||
Reference in New Issue
Block a user