From f61cf7a4d071e55710175fc03f1d599694baa770 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 24 Aug 2023 21:29:15 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 30f33c2f..9f13c9fd 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -580,15 +580,15 @@ BACKUP_OFFSITEPFSENSE(){ scp root@10.2.1.1:/cf/conf/conf* ${newBAKFOLDER}/ ssh root@10.2.1.1 rm -f /cf/conf/conf_backup.tar.gz - if [ "$(date +%u)" == "1" ]; then + if [ "$(date +%u)" == "4" ]; then cp ${newBAKFOLDER} ${newBAKFOLDER/-D/-W} - elif [ "$(date +%d)" == "1" ]; then + elif [ "$(date +%d)" == "24" ]; then cp ${newBAKFOLDER} ${newBAKFOLDER/-D/-M} fi - dailyfilestokeep=(`ls -d ${BAKFOLDER}/*-D | tail -2`) - weeklyfilestokeep=(`ls -d ${BAKFOLDER}/*-W | tail -2`) - monthlyfilestokeep=(`ls -d ${BAKFOLDER}/*-M | tail -2`) + dailyfilestokeep=(`ls -d ${BAKFOLDER}/*-D | tail -2`) >/dev/null 2>&1 + weeklyfilestokeep=(`ls -d ${BAKFOLDER}/*-W | tail -2`) >/dev/null 2>&1 + monthlyfilestokeep=(`ls -d ${BAKFOLDER}/*-M | tail -2`) >/dev/null 2>&1 for i in $(ls -d ${BAKFOLDER}/*); do keep=0 if [[ "${i}" == *"-D"* ]]; then