From bb9f77f5a4add0b2251a0d30f1764d7b7d684205 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 2 May 2023 21:51:38 -0500 Subject: [PATCH] update --- defaults.inc | 5 +++-- nodemgmt-scripts.sh | 15 +++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/defaults.inc b/defaults.inc index c0ce036d..c371beea 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='4.6.24-04302023' +VERS='4.6.27-04302023' #NODETYPES=WEB,LB NODETYPES=MYSQL,LB,WEB,NC,WPD,LPD,MM,PW @@ -34,7 +34,8 @@ CERT_DAEMON='/snap/bin/certbot' FOLDER=/opt/idssys/nodemgmt TMPFOLDER=${FOLDER}/.tmp SCRIPT=${FOLDER}/nodemgmt-scripts.sh -LOGFILE=${FOLDER}/logfile +LOGFOLDER=${FOLDER}/logs +LOGFILE=${LOGFOLDER}/logfile RENOTIFY=900 [ ! -d ${TMPFOLDER} ] && mkdir ${TMPFOLDER} diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index c5baf808..5f85fe9b 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1222,15 +1222,22 @@ if [ ${action-x} ]; then delsites) DELSITES;; newsite) NEWSITE ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23} ${24} ${25};; update) ;; - update-nodes) NODEUPDATE ${2};; + update-nodes) + if [ "${2}" == "report" ]; then + rm -f ${LOGFOLDER}/update-nodes.lastrun + NODEUPDATE ${2} > ${LOGFOLDER}/update-nodes.lastrun + else + NODEUPDATE ${2} + fi + ;; update-dyndns) UPDATE_DYNDNS ${2};; backup) BACKUP;; downlist) if [ "${2}" = "report" ]; then if [ "$(find ${FOLDER} -name '*.down')" != "" ]; then - rm -f ${FOLDER}/status-downlist.lastrun - DOWNLIST report >> ${FOLDER}/status-downlist.lastrun - STATUSLOG="$(cat ${FOLDER}/status-downlist.lastrun)" + rm -f ${LOGFOLDER}/status-downlist.lastrun + DOWNLIST report >> ${LOGFOLDER}/status-downlist.lastrun + STATUSLOG="$(cat ${LOGFOLDER}/status-downlist.lastrun)" SENDNOTICE "Downlist Report" "Downlist Report\n${STATUSLOG}" fi else