From a3c96d1bddfbef82ffc029ace435f3276a58ca6a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 6 Dec 2023 23:20:31 -0600 Subject: [PATCH] update --- defaults.inc | 2 +- inc/status.inc | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/defaults.inc b/defaults.inc index 47939187..e005b87d 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,5 +1,5 @@ #!/usr/bin/env bash -VERS='5.1.2-12062023' +VERS='5.1.3-12062023' NM_BETA=false noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log betacheck ' diff --git a/inc/status.inc b/inc/status.inc index f8c38b5d..0914a4b1 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -1,10 +1,8 @@ #!/usr/bin/env bash STATUS(){ - start=`date +%s` - - PRI_CW=40; - ST_ACTION=${1} - [ "${ST_ACTION}" == "sync" ] && ST_ACTION=repl + start=$(date +%s) + log_start=$(date "+%Y-%m-%d %H:%M:%S") + PRI_CW=40 declare -i cw; declare -i spc1; declare -i c if [ "${NM_NODETYPES[${ST_ACTION^^}]}" != "" ]; then @@ -14,6 +12,7 @@ STATUS(){ else ntss="" ntypesel=(${NM_NODE_TYPES[@]}) + [ "${1}" == "sync" ] && ST_ACTION=repl || ST_ACTION=${1} fi ############################ @@ -402,7 +401,7 @@ It was down for $(SHOW_TIME $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${ end=`date +%s` runtime=$((end-start)) echo -e "Runtime: ${runtime}\n" - [ "${ST_ACTION}" == "report" ] && echo "$(date "+%Y-%m-%d %H:%M:%S")~${runtime}" >> ${NM_LOGFOLDER}/status-check.scantimes + [ "${ST_ACTION}" == "report" ] && echo "${log_start}~${runtime}" >> ${NM_LOGFOLDER}/status-check.scantimes } STATUS_NODE(){