From 32a5f1c1840a3fa6affd207565ed6dfc2b270516 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 15 Mar 2020 13:12:47 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 3c752c3e..8125ddc7 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1644,6 +1644,13 @@ VCENTER-SSL(){ exit 1 fi } +ADD_LOGROTATE_CRONTAB(){ + (crontab -l ; echo "0 */1 * * * logrotate -f /opt/idssys/nodemgmt/tmp-logrotate")| crontab - + echo "" + echo -e "${idsCL[Green]}The crontab entry has been made${idsCL[Default]}" + echo "" + read -n 1 -s -p "Press any key to continue" +} GUI(){ DISP_HEADER true false @@ -1662,6 +1669,8 @@ GUI(){ echo " [8] Set folder permissions on nodes" echo " [9] Backup Node Settings and Files" echo "" + echo " [R] Add cron task to rotate wtmp & btmp log files" + echo "" echo " [Q] Quit" echo "" echo "" @@ -1678,6 +1687,7 @@ GUI(){ 7) LISTCERTS; GUI;; 8) SET-PERMISSIONS; GUI;; 9) BACKUP; GUI;; + [Rr]) ADD_LOGROTATE_CRONTAB; GUI;; [Qq]) EXIT1 exit 0;; *) echo "Thats an invaild option,";