[rsyslog-notify] Forum Thread: How do I conf an $outchannel log rotation with RainerScript? - (Mode 'post')
noreply at adiscon.com
noreply at adiscon.com
Wed Feb 11 14:02:52 CET 2015
User: xdaxdb
Forumlink: http://kb.monitorware.com/viewtopic.php?p=25233#p25233
Message:
----------
I am using an $outchannel to do log rotation currently. It is my
understanding that this syntax is undesirable. What would be the proper way
to do the exact same thing using RainerScript ?
[code:3e2swml0]$outchannel
messages,/syslog/messages,104857600,/syslog/scripts/_messages_r.sh
$FileOwner root
$FileCreateMode 0644
$DirCreateMode 0755
$umask 0022
*.*;mail.none;auth.none;authpriv.none;cron.none :omfile:$messages
[/code:3e2swml0]
In case it's relevant, this is the code in the
[b:3e2swml0]_messages_r.sh[/b:3e2swml0] script specified in the $outchannel
above:
[code:3e2swml0]#!/bin/sh
varDate=$(date +%s)
mv -f /syslog/messages /syslog/messages.${varDate}
gzip -5 /syslog/messages.${varDate}
chmod 644 /syslog/messages[/code:3e2swml0]
More information about the rsyslog-notify
mailing list