From ae0c321445eed2018ff4a7baf92ec21b985263e7 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Tue, 18 Dec 2012 10:56:20 +0000 Subject: [PATCH] Fix kill signal and file permissions for log rotation --- nginx-upgrade | 2 +- nginx.logrotate | 3 ++- nginx.spec | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/nginx-upgrade b/nginx-upgrade index 4200876..70f71e5 100644 --- a/nginx-upgrade +++ b/nginx-upgrade @@ -1,7 +1,7 @@ #!/bin/sh [ ! -f /run/nginx.pid ] && exit 1 echo "Start new nginx master..." -/bin/systemctl kill --signal=USR2 nginx.service +/bin/systemctl kill --signal=SIGUSR2 nginx.service sleep 5 [ ! -f /run/nginx.pid.oldbin ] && sleep 5 if [ ! -f /run/nginx.pid.oldbin ]; then diff --git a/nginx.logrotate b/nginx.logrotate index 19af788..a6f829b 100644 --- a/nginx.logrotate +++ b/nginx.logrotate @@ -1,4 +1,5 @@ /var/log/nginx/*log { + create 0644 root nginx daily rotate 10 missingok @@ -6,7 +7,7 @@ compress sharedscripts postrotate - /bin/systemctl kill --signal=USR1 nginx.service + /bin/systemctl kill --signal=SIGUSR1 nginx.service endscript } diff --git a/nginx.spec b/nginx.spec index bb6638e..28ec981 100644 --- a/nginx.spec +++ b/nginx.spec @@ -11,7 +11,7 @@ Name: nginx Epoch: 1 Version: 1.2.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A high performance web server and reverse proxy server Group: System Environment/Daemons @@ -202,6 +202,11 @@ fi %changelog +* Tue Dec 18 2012 Jamie Nguyen - 1:1.2.6-2 +- send correct kill signal and use correct file permissions when rotating + log files (#888225) +- send correct kill signal in nginx-upgrade + * Tue Dec 11 2012 Jamie Nguyen - 1:1.2.6-1 - update to upstream release 1.2.6