Fix kill signal and file permissions for log rotation

This commit is contained in:
Jamie Nguyen 2012-12-18 10:56:20 +00:00
parent 7137e03771
commit ae0c321445
3 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
[ ! -f /run/nginx.pid ] && exit 1 [ ! -f /run/nginx.pid ] && exit 1
echo "Start new nginx master..." echo "Start new nginx master..."
/bin/systemctl kill --signal=USR2 nginx.service /bin/systemctl kill --signal=SIGUSR2 nginx.service
sleep 5 sleep 5
[ ! -f /run/nginx.pid.oldbin ] && sleep 5 [ ! -f /run/nginx.pid.oldbin ] && sleep 5
if [ ! -f /run/nginx.pid.oldbin ]; then if [ ! -f /run/nginx.pid.oldbin ]; then

View File

@ -1,4 +1,5 @@
/var/log/nginx/*log { /var/log/nginx/*log {
create 0644 root nginx
daily daily
rotate 10 rotate 10
missingok missingok
@ -6,7 +7,7 @@
compress compress
sharedscripts sharedscripts
postrotate postrotate
/bin/systemctl kill --signal=USR1 nginx.service /bin/systemctl kill --signal=SIGUSR1 nginx.service
endscript endscript
} }

View File

@ -11,7 +11,7 @@
Name: nginx Name: nginx
Epoch: 1 Epoch: 1
Version: 1.2.6 Version: 1.2.6
Release: 1%{?dist} Release: 2%{?dist}
Summary: A high performance web server and reverse proxy server Summary: A high performance web server and reverse proxy server
Group: System Environment/Daemons Group: System Environment/Daemons
@ -202,6 +202,11 @@ fi
%changelog %changelog
* Tue Dec 18 2012 Jamie Nguyen <jamielinux@fedoraproject.org> - 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 <jamielinux@fedoraproject.org> - 1:1.2.6-1 * Tue Dec 11 2012 Jamie Nguyen <jamielinux@fedoraproject.org> - 1:1.2.6-1
- update to upstream release 1.2.6 - update to upstream release 1.2.6