]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
logrotate: Fix duplicate log entries.
authorNaveen Albert <asterisk@phreaknet.org>
Thu, 18 May 2023 16:55:45 +0000 (16:55 +0000)
committerGeorge Joseph <gtjoseph@users.noreply.github.com>
Thu, 25 May 2023 16:38:50 +0000 (10:38 -0600)
The Asterisk logrotate script contains explicit
references to files with the .log extension,
which are also included when *log is expanded.
This causes issues with newer versions of logrotate.
This fixes this by ensuring that a log file cannot
be referenced multiple times after expansion occurs.

Resolves: #96
ASTERISK-30442
Reported by: EN Barnett
Tested by: EN Barnett

contrib/scripts/asterisk.logrotate

index f774446803b3dbe2bef7abf0027d2018b1da1fdd..dc0bb16efdb83103bdb6479afb1f99e7a9981768 100644 (file)
@@ -1,13 +1,13 @@
-__LOGDIR__/debug.log __LOGDIR__/console __LOGDIR__/full.log __LOGDIR__/messages.log __LOGDIR__/*log {
+__LOGDIR__/*.log __LOGDIR__/queue_log __LOGDIR__/mmlog {
        weekly
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
-       create 640 root root 
+       create 640 root root
        sharedscripts
        postrotate
-               __SBINDIR__/asterisk -rx 'logger reload' > /dev/null 2> /dev/null       
+               __SBINDIR__/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
        endscript
-} 
+}