You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
In FreePBX -> Settings -> Asterisk Logfile Settings, you can configure log rotation. I believe this uses logrotate, as it appears to configure it in /etc/logrotate.d/asterisk. Running logrotate /etc/logrotate.conf -v -f inside the container rotates the asterisk logs as expected. However, I think the container is missing a service to run this daily.
Looking at /lib/systemd/system/, there is logrotate.service and logrotate.timer, which suggests there should be something similar in /etc/init.d, but I am not seeing it. On my host OS (Ubuntu Server 20.04), I also see a cron job at /etc/cron.daily/logrotate with the following:
$ cat /etc/cron.daily/logrotate
#!/bin/sh
# skip in favour of systemd timer
if [ -d /run/systemd/system ]; then
exit 0
fi
# this cronjob persists removals (but not purges)
if [ ! -x /usr/sbin/logrotate ]; then
exit 0
fi
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit $EXITVALUE
I am not completely sure what the solution is here, but I think it involves either adding an init.d service for logrotate with a timer or a daily cron job.
The text was updated successfully, but these errors were encountered:
In FreePBX -> Settings -> Asterisk Logfile Settings, you can configure log rotation. I believe this uses logrotate, as it appears to configure it in
/etc/logrotate.d/asterisk
. Runninglogrotate /etc/logrotate.conf -v -f
inside the container rotates the asterisk logs as expected. However, I think the container is missing a service to run this daily.Looking at
/lib/systemd/system/
, there islogrotate.service
andlogrotate.timer
, which suggests there should be something similar in/etc/init.d
, but I am not seeing it. On my host OS (Ubuntu Server 20.04), I also see a cron job at/etc/cron.daily/logrotate
with the following:I am not completely sure what the solution is here, but I think it involves either adding an init.d service for logrotate with a timer or a daily cron job.
The text was updated successfully, but these errors were encountered: