Fixed logrotate config file and its installation.
(cherry picked from commit ec3a500b01
)
This commit is contained in:
parent
234185f6ba
commit
653d7093fc
|
@ -471,8 +471,8 @@ install () {
|
|||
then
|
||||
[ -d $DESTDIR/etc/logrotate.d ] && mkdir -p $DESTDIR/etc/logrotate.d
|
||||
echo "Creating logrotate.d entry for Pandora FMS log management"
|
||||
echo "$PANDORA_BASE$PANDORA_LOG_DIR/$PANDORA_LOG" > pandora_agent_logrotate
|
||||
cp pandora_agent_logrotate $DESTDIR/etc/logrotate.d/pandora_agent
|
||||
sed -e "s|^/var/log/pandora/pandora_agent.log|$PANDORA_BASE_REAL$PANDORA_LOG_DIR/$PANDORA_LOG|" pandora_agent_logrotate \
|
||||
> $DESTDIR/etc/logrotate.d/pandora_agent
|
||||
else
|
||||
echo "Please add a log rotation schedule manually to your log rotation daemon (if any)"
|
||||
fi
|
||||
|
|
|
@ -1 +1,10 @@
|
|||
/var/log/pandora/pandora_agent.log
|
||||
/var/log/pandora/pandora_agent.log {
|
||||
weekly
|
||||
missingok
|
||||
size 300000
|
||||
rotate 3
|
||||
maxage 90
|
||||
compress
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue