Prevent logrotate file to overwrite in tarball

This commit is contained in:
Kevin 2021-03-31 17:24:18 +02:00
parent 321fc8aa05
commit 89a7eb7a20
1 changed files with 8 additions and 3 deletions

View File

@ -354,9 +354,14 @@ install () {
if [ -d /etc/logrotate.d ]
then
[ -d $DESTDIR/etc/logrotate.d ] || mkdir -p $DESTDIR/etc/logrotate.d
echo "Creating logrotate.d entry for Pandora FMS log management"
cp util/pandora_server_logrotate $DESTDIR/etc/logrotate.d/pandora_server
if [ -f $DESTDIR/etc/logrotate.d/pandora_server ]
then
echo "A logrotate.d entry for Pandora FMS log management already exists, skipping creation"
else
echo "Creating logrotate.d entry for Pandora FMS log management"
[ -d $DESTDIR/etc/logrotate.d ] || mkdir -p $DESTDIR/etc/logrotate.d
cp util/pandora_server_logrotate $DESTDIR/etc/logrotate.d/pandora_server
fi
else
echo "Please add a log rotation schedule manually to your log rotation daemon (if any)"
fi