Hello,
try to use:
postrotate
/usr/lib/rsyslog/rsyslog-rotate 2> /dev/null || true
Endscript
Cheers,
Henning
-----Original Message-----
From: christian.marinelli--- via sr-users <sr-users(a)lists.kamailio.org>
Sent: Dienstag, 16. April 2024 18:27
To: sr-users(a)lists.kamailio.org
Cc: christian.marinelli(a)hotmail.it
Subject: [SR-Users] Problem with logrotate in Ubuntu 22.04!
Hi all,
i set up a simple Kamailio SIP server with the latest stable versione.
Than, by following the documntation, i tried to set up a file log instead of the
standard syslog log, so i changed the syslog.conf by adding this lines:
# don't log messages with LOG_LOCAL0 in /var/log/syslog anymore
*.*;auth,authpriv.none,local0.none -/var/log/syslog
#
# log messages with LOG_LOCAL0 in /var/log/kamailio.log
local0.* -/var/log/kamailio.log
Then, i created a kamailio file in /etc/logrotate.d with this content to manage the
log rotation:
/var/log/kamailio.log {
su root root
daily
rotate 7
compress
delaycompress
missingok
notifempty
create 0640 syslog adm
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null ||
true
endscript
}
I found all these information in
https://www.kamailio.org/wikidocs/tutorials/3.2.x/syslog/
Unfortunatly, in my Ubuntu 22.04 server there isn't a syslogd.pid file in that path
so the logrotation doesn't work.
Can anyone help me to understand the problem?
Thank you so much in advance
Christian
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send
an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: