Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make logrotate work with different versions of nginx. Fixes #283. #1

Merged
merged 1 commit into from
Apr 10, 2015

Conversation

danjung
Copy link

@danjung danjung commented Apr 10, 2015

No description provided.

@@ -37,7 +37,7 @@
ifempty => false,
missingok => true,
sharedscripts => true,
postrotate => '/etc/init.d/nginx reopen_logs',
postrotate => '/etc/init.d/nginx reopen_logs 2>/dev/null || /bin/kill -USR1 `cat /var/run/nginx.pid 2>/dev/null` 2>/dev/null || true',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the || true here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they want a true condition always. I am just modeling after the new logrotate. I don't think it really matters.

/var/log/nginx/*log {
create 0644 nginx nginx
daily
rotate 10
missingok
notifempty
compress
sharedscripts
postrotate
/bin/kill -USR1 cat /run/nginx.pid 2>/dev/null 2>/dev/null || true
endscript
}

kcampos added a commit that referenced this pull request Apr 10, 2015
Make logrotate work with different versions of nginx.  Fixes voxpupuli#283.
@kcampos kcampos merged commit 75faddf into BioIQ:master Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants