Fixed logrotate config file and its installation.

(cherry picked from commit ec3a500b01)
This commit is contained in:
KIKUCHI Koichiro 2016-03-03 13:02:45 +09:00
parent 234185f6ba
commit 653d7093fc
2 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -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
}