From: Jan J. K. <ja...@ni...> - 2008-05-08 12:21:27
|
Hi Bonno, Bonno Bloksma wrote: > Hi, > > Using Openvpn 2.0.9-4etch1_i386 on Debian eth 4.0r3 > I want to keep my OpenVPN log messages seperate and don't have them in > the syslog. But... I do need to have to rotate the log at least once a > week. > > 1) > Currently I log to /etc/openvpn/openvpn.log, should I change that to > /var/log/openvpn.log? > Would changing the line: > log-append openvpn.log > to > log-append /var/log/openvpn.log > be enough? The documentation does not state whether a full path is > possible or just a filename. yes this is possible > > 2) > How do I add the openvpn.log file to the weekly logrotation on a > Debian etch systeem? > Probably something with /etc/logrotate.conf or a file in > /etc/logrotate.d/ but.. I'm almost there but not quite. :-) > > It seems I might have to put an openvpn file in the /etc/logrotate.d/ > directory with something like: > /var/log/openvpn.log { > weekly > rotate 4 > compress > missingok > postrotate > pkill -SIGUSR1 openvpn > /dev/null > endscript > } > But it's the postrotate section I'm not sure about. > I use /var/log/openvpn.log { rotate 5 copytruncate missingok notifempty size 512k } which works without a postrotate section... HTH, JJK |