I use the following on RHEL4, using logrotate, and it works fine.
--
/var/log/openser.log {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null ||
true
endscript
}
--
Zahid
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Marc Leurent
Sent: Monday, March 09, 2009 6:28 AM
To: [email protected]
Subject: [OpenSIPS-Users] Logrotate opensips.log
Hello All,
I'm trying to add logrotate to my opensips.log file without having to restart
opensips... if it is possible!
Here are my config files. I ask opensips to log to local6 and put it in
a /var/log/opensips.log file.
When I lanched logrotate /etc/logrotate.d/opensips, logrotate works, and main
file inode do not change and is truncated, but opensips doensn't log anymore
in the file.
Have you got any idea how to do it please?
Thanks!
/etc/opensips/opensips.cfg:
log_facility=LOG_LOCAL6
/etc/syslog.conf:
#log opensips messages to own log
local6.* /var/log/opensips.log
/etc/logrotate.d/opensips:
/var/log/opensips/opensips.log {
rotate 7
daily
compress
size=500M
copytruncate
}
--
-- --
Marc LEURENT
Ingénieur VoIP
DECKPOINT SA
Une société du groupe VTX Telecom
================================================================
Rue Eugène-Marziano 15 - 1227 Les Acacias
http://www.vtx.ch - [email protected]
----------------------------------------------------------------
VTX, votre partenaire telecom proche de vous !
================================================================
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users