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