mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
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 ]
|
if [ -d /etc/logrotate.d ]
|
||||||
then
|
then
|
||||||
[ -d $DESTDIR/etc/logrotate.d ] || mkdir -p $DESTDIR/etc/logrotate.d
|
if [ -f $DESTDIR/etc/logrotate.d/pandora_server ]
|
||||||
echo "Creating logrotate.d entry for Pandora FMS log management"
|
then
|
||||||
cp util/pandora_server_logrotate $DESTDIR/etc/logrotate.d/pandora_server
|
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
|
else
|
||||||
echo "Please add a log rotation schedule manually to your log rotation daemon (if any)"
|
echo "Please add a log rotation schedule manually to your log rotation daemon (if any)"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user