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:
Alexander Lopatin
2024-10-17 10:35:53 +03:00
committed by Joonas Niilola
parent 6aa39fde03
commit 108a642ef4
6 changed files with 11 additions and 6 deletions
+4 -1
View File
@@ -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}"
+3 -1
View File
@@ -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
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)" \
+1 -1
View File
@@ -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)" \