Bugzilla – Attachment 72040 Details for
Bug 19610
Make koha-common.logrotate use copytruncate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19610: Make koha-common.logroate use copytruncate
Bug-19610-Make-koha-commonlogroate-use-copytruncat.patch (text/plain), 2.16 KB, created by
Josef Moravec
on 2018-02-21 17:43:01 UTC
(
hide
)
Description:
Bug 19610: Make koha-common.logroate use copytruncate
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-02-21 17:43:01 UTC
Size:
2.16 KB
patch
obsolete
>From 3217dfd019d28e5af2c88766ba7c5661287b72d2 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Sat, 17 Feb 2018 11:57:43 -0300 >Subject: [PATCH] Bug 19610: Make koha-common.logroate use copytruncate > >This patch makes logrotate use the **copytruncate** directive, removing >the need to stop the Zebra and Plack servers on log rotation. > >To test: >- Run: > $ misc4dev/cp_debian_files.pl >- Edit the new /etc/logrotate.d/koha-common file changing 'weekly' for >'hourly'. This is to ease testing. >- Run: > $ sudo ls -l /var/log/koha/kohadev >- Open a second terminal on your kohadevbox. On it... >- Run: > $ sudo logrotate /etc/logrotate.d/koha-common >- Run: > $ sudo ls -l /var/log/koha/kohadev >=> SUCCESS: Files got rotated! (i.e. files ending in .1 are created, the > sizes make sense (.1 have contents, the ones without numbering > probably zeroed <- it will depend on what's happening with > your devbox in between). >- Play with your Koha, do some searches too: >=> SUCCESS: You have access to your Koha, searches work. i.e.: > - Apache handled the log rotation operation > - Plack handled the log rotation operation > - Zebra handled the log rotation operation >- Sign off :-D! > >Sponsored-by: Orex Digital > >Signed-off-by: Hugo Agud hagud@orex.es > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > debian/koha-common.logrotate | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > >diff --git a/debian/koha-common.logrotate b/debian/koha-common.logrotate >index 3d8f7c0..1f083fe 100644 >--- a/debian/koha-common.logrotate >+++ b/debian/koha-common.logrotate >@@ -4,17 +4,12 @@ > rotate 5 > weekly > missingok >+ copytruncate > compress > delaycompress > notifempty > sharedscripts >- prerotate >- /usr/sbin/koha-zebra --stop $(koha-list --enabled) > /dev/null >- /usr/sbin/koha-plack --stop --quiet $(koha-list --enabled --plack) > /dev/null >- endscript > postrotate > /etc/init.d/apache2 reload > /dev/null >- /usr/sbin/koha-plack --start --quiet $(koha-list --enabled --plack) > /dev/null >- /usr/sbin/koha-zebra --start $(koha-list --enabled) > /dev/null > endscript > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19610
:
71884
|
71997
|
72040
|
72042