From 7edf379b81fc26406cb8766abc6174b16b5f0dbb Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 06:56:19 +0100 Subject: [PATCH] Do not remove legacy logs if empty --- lgsm/functions/logs.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index ac2c3d771..44467d82f 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -101,10 +101,6 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" legacycount=$(find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"|wc -l) find "${legacyserverlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - # Remove directory if empty - if [ ! "$(ls -A "${legacyserverlogdir}")" ]; then - rm -rf "${legacyserverlogdir}" - fi fi # Count total amount of files removed