Skip to content

[bug]: make install-logrotate causes logrotate to fail on service restart #96

Description

@InterLinked1

Severity

Minor

Versions

20.1.0

Components/Modules

asterisk.logrotate

Operating Environment

Debian 11

Frequency of Occurrence

Constant

Issue Description

Imported from JIRA: https://issues.asterisk.org/jira/browse/ASTERISK-30442

Commit 55c53de changed the first line of contrib/scripts/asterisk.logrotate to read

__LOGDIR__/debug.log __LOGDIR__/console __LOGDIR__/full.log __LOGDIR__/messages.log __LOGDIR__/*log {

Installing asterisk and running the service creates the file /var/log/asterisk/messages.log.
Running make install-logrotate installs /etc/logrorate.d/asterisk from the above template. Then running systemctl restart logrotate results in a failed service for logrotate. Manually calling logrotate from the command line reveals the error is

error: asterisk:1 duplicate log entry for /var/log/asterisk/messages.log
error: found error in file asterisk, skipping

The "*log" in the first line of the logrotate config is expanding to messages.log, which now means that file is listed twice, and the configuration is bad. The obvious fix is to remove all explicit .log files and just allow the file globbing to take care of that.

__LOGDIR__/console __LOGDIR__/*.log {

Relevant log output

No response

Asterisk Issue Guidelines

  • Yes, I have read the Asterisk Issue Guidelines

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions