Add sample nghttpx logrotate configuration

This commit is contained in:
Tatsuhiro Tsujikawa 2014-10-19 18:09:01 +09:00
parent eaca5d83b0
commit 75a23c6c7e
2 changed files with 19 additions and 1 deletions

View File

@ -21,7 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
EXTRA_DIST = nghttpx-init.in
EXTRA_DIST = nghttpx-init.in nghttpx-logrotate
edit = sed -e 's|@bindir[@]|$(bindir)|g'

18
contrib/nghttpx-logrotate Normal file
View File

@ -0,0 +1,18 @@
/var/log/nghttpx/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 0640 www-data adm
sharedscripts
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi \
endscript
postrotate
[ -s /run/nghttpx.pid ] && kill -USR1 `cat /run/nghttpx.pid`
endscript
}