Prevent logrotate file to overwrite in tarball
This commit is contained in:
parent
321fc8aa05
commit
89a7eb7a20
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue