From fa1f43baad1071f81cb83a81550a80a1fea8df54 Mon Sep 17 00:00:00 2001 From: Xav 2600hz Date: Mon, 5 Aug 2013 22:53:10 +0200 Subject: [PATCH 1/2] Added a Logrotate conf file for FreeSWITCH --- system/logrotate.d/freeswitch.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 system/logrotate.d/freeswitch.conf diff --git a/system/logrotate.d/freeswitch.conf b/system/logrotate.d/freeswitch.conf new file mode 100644 index 0000000..eb77652 --- /dev/null +++ b/system/logrotate.d/freeswitch.conf @@ -0,0 +1,13 @@ +/var/log/freeswitch/*.log { + daily + rotate 31 + nocreate + missingok + maxage 5 + compress + delaycompress + sharedscripts + prerotate + /bin/kill -HUP `cat /usr/local/freeswitch/run/freeswitch.pid 2> /dev/null` 2> /dev/null || true + endscript +} From 8d73b6627dab5972393f8e2b2fd3b1db15711c3e Mon Sep 17 00:00:00 2001 From: Xav 2600hz Date: Mon, 5 Aug 2013 23:05:22 +0200 Subject: [PATCH 2/2] Added a limit of 5 days to all Logrotate configuration files. Logs older than 5 days will be deleted. --- system/logrotate.d/2600hz-platform.conf | 1 + system/logrotate.d/bigcouch.conf | 1 + system/logrotate.d/kamailio.conf | 1 + 3 files changed, 3 insertions(+) diff --git a/system/logrotate.d/2600hz-platform.conf b/system/logrotate.d/2600hz-platform.conf index adc44fd..cdb2a4e 100644 --- a/system/logrotate.d/2600hz-platform.conf +++ b/system/logrotate.d/2600hz-platform.conf @@ -3,6 +3,7 @@ missingok notifempty rotate 31 + maxage 5 create compress delaycompress diff --git a/system/logrotate.d/bigcouch.conf b/system/logrotate.d/bigcouch.conf index 68291d0..12827ad 100644 --- a/system/logrotate.d/bigcouch.conf +++ b/system/logrotate.d/bigcouch.conf @@ -3,6 +3,7 @@ missingok notifempty rotate 31 + maxage 5 create compress delaycompress diff --git a/system/logrotate.d/kamailio.conf b/system/logrotate.d/kamailio.conf index f3b282b..621e1ba 100644 --- a/system/logrotate.d/kamailio.conf +++ b/system/logrotate.d/kamailio.conf @@ -3,6 +3,7 @@ missingok notifempty rotate 31 + maxage 5 create compress delaycompress