summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/asterisk-base/files/logrotate-1')
-rw-r--r--net-misc/asterisk-base/files/logrotate-127
1 files changed, 27 insertions, 0 deletions
diff --git a/net-misc/asterisk-base/files/logrotate-1 b/net-misc/asterisk-base/files/logrotate-1
new file mode 100644
index 000000000000..2286efc1e7e9
--- /dev/null
+++ b/net-misc/asterisk-base/files/logrotate-1
@@ -0,0 +1,27 @@
+/var/log/asterisk/messages {
+ missingok
+ notifempty
+
+ postrotate
+ test -e /run/openrc/softlevel && /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ test -e /run/systemd/system && systemctl is-active --quiet asterisk.service && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ endscript
+}
+
+/var/log/asterisk/debug /var/log/asterisk/full {
+ missingok
+ notifempty
+ daily
+
+ postrotate
+ test -e /run/openrc/softlevel && /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ test -e /run/systemd/system && systemctl is-active --quiet asterisk.service && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ endscript
+}
+
+/var/log/asterisk/cdr-csv/*.csv /var/log/asterisk/cdr-custom/*.csv /var/log/asterisk/queue_log {
+ missingok
+ notifempty
+ weekly
+ rotate 52
+}