summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/nginx/files/nginx.confd5
-rw-r--r--www-servers/nginx/files/nginx.initd-r44
-rw-r--r--www-servers/nginx/files/nginx.logrotate-r12
-rw-r--r--www-servers/nginx/files/nginx.service-r12
-rw-r--r--www-servers/nginx/nginx-1.26.2-r3.ebuild2
-rw-r--r--www-servers/nginx/nginx-1.27.2.ebuild2
6 files changed, 11 insertions, 6 deletions
diff --git a/www-servers/nginx/files/nginx.confd b/www-servers/nginx/files/nginx.confd
index f4b804375e92..478ad588f4e4 100644
--- a/www-servers/nginx/files/nginx.confd
+++ b/www-servers/nginx/files/nginx.confd
@@ -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}"
diff --git a/www-servers/nginx/files/nginx.initd-r4 b/www-servers/nginx/files/nginx.initd-r4
index 31f79baa099b..c9896289975f 100644
--- a/www-servers/nginx/files/nginx.initd-r4
+++ b/www-servers/nginx/files/nginx.initd-r4
@@ -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
diff --git a/www-servers/nginx/files/nginx.logrotate-r1 b/www-servers/nginx/files/nginx.logrotate-r1
index bc9d87a09a91..81eca0168ced 100644
--- a/www-servers/nginx/files/nginx.logrotate-r1
+++ b/www-servers/nginx/files/nginx.logrotate-r1
@@ -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
}
diff --git a/www-servers/nginx/files/nginx.service-r1 b/www-servers/nginx/files/nginx.service-r1
index e160af7625b7..d87081788091 100644
--- a/www-servers/nginx/files/nginx.service-r1
+++ b/www-servers/nginx/files/nginx.service-r1
@@ -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
diff --git a/www-servers/nginx/nginx-1.26.2-r3.ebuild b/www-servers/nginx/nginx-1.26.2-r3.ebuild
index 657fa2679891..df9a7fc03956 100644
--- a/www-servers/nginx/nginx-1.26.2-r3.ebuild
+++ b/www-servers/nginx/nginx-1.26.2-r3.ebuild
@@ -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)" \
diff --git a/www-servers/nginx/nginx-1.27.2.ebuild b/www-servers/nginx/nginx-1.27.2.ebuild
index 7588c9071150..1a85e9d9c4ec 100644
--- a/www-servers/nginx/nginx-1.27.2.ebuild
+++ b/www-servers/nginx/nginx-1.27.2.ebuild
@@ -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)" \