diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 7e16a9f00d..6856041a75 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -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