commit fa88cb5375c753c538a61bb79eb18d2cca554609
Author: Arkadiusz Miśkiewicz <[email protected]>
Date:   Thu Feb 14 09:10:24 2019 +0100

    - rel 3; when nginx is stuck and has oldbin and current bin for hours/days 
then log rotation only tells current binary to reopen logs leaving old one 
logging to old files. Tell old binary, too to reopen logs.

 nginx.init | 7 +++++++
 nginx.spec | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/nginx.spec b/nginx.spec
index ccf0ff7..a43813c 100644
--- a/nginx.spec
+++ b/nginx.spec
@@ -42,7 +42,7 @@ Summary(pl.UTF-8):    Serwer HTTP i odwrotne proxy o wysokiej 
wydajności
 # - mainline: production quality but API can change
 Name:          nginx
 Version:       1.15.8
-Release:       2
+Release:       3
 License:       BSD-like
 Group:         Networking/Daemons/HTTP
 Source0:       http://nginx.org/download/%{name}-%{version}.tar.gz
diff --git a/nginx.init b/nginx.init
index 5ac987b..f209fc0 100755
--- a/nginx.init
+++ b/nginx.init
@@ -152,6 +152,13 @@ upgrade() {
 # Tell nginx to reopen logs
 # http://nginx.org/en/docs/control.html#logs
 reopen_logs() {
+       local oldbin_pidfile="${pidfile}.oldbin"
+
+       if [ -f $oldbin_pidfile ]; then
+               show "Reopening $svname (oldbin) logs"
+               killproc -p $oldbin_pidfile $prog -USR1
+       fi
+
        show "Reopening $svname logs"
        killproc -p $pidfile $prog -USR1
 }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nginx.git/commitdiff/fa88cb5375c753c538a61bb79eb18d2cca554609

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to