update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='5.1.71-01112024'
|
||||
VERS='5.1.72-01112024'
|
||||
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 '
|
||||
|
||||
@@ -348,6 +348,7 @@ It was down for $(SHOW_TIME $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${
|
||||
fi
|
||||
fi
|
||||
done
|
||||
REPLRUN=2
|
||||
touch ${NM_TMPFOLDER}/.replclean
|
||||
fi
|
||||
fi
|
||||
@@ -887,6 +888,8 @@ STATUS_SCANTIMES(){
|
||||
scantimes_norm_xtr=0; scansfound_norm_xtr=0
|
||||
scantimes_repl=0; scansfound_repl=0
|
||||
scantimes_repl_xtr=0; scansfound_repl_xtr=0
|
||||
scantimes_replchk=0; scansfound_replchk=0
|
||||
scantimes_replchk_xtr=0; scansfound_replchk_xtr=0
|
||||
for scan in "${scantimes[@]}"; do
|
||||
scantime=$(echo "${scan}" | cut -d '~' -f 2)
|
||||
scanrun=$(echo "${scan}" | cut -d '~' -f 3)
|
||||
@@ -895,15 +898,7 @@ STATUS_SCANTIMES(){
|
||||
longest_scandate=$(echo "${scan}" | cut -d '~' -f 1)
|
||||
fi
|
||||
|
||||
if [ ${scanrun} -eq 1 ]; then
|
||||
if [ ${scantime} -lt 60 ]; then
|
||||
scantimes_repl=$(bc <<< "scale=2; ${scantimes_repl}+${scantime}")
|
||||
((scansfound_repl++))
|
||||
else
|
||||
scantimes_repl_xtr=$(bc <<< "scale=2; ${scantimes_repl_xtr}+${scantime}")
|
||||
((scansfound_repl_xtr++))
|
||||
fi
|
||||
else
|
||||
if [ ${scanrun} -eq 0 ]; then
|
||||
if [ ${scantime} -lt 60 ]; then
|
||||
scantimes_norm=$(bc <<< "scale=2; ${scantimes_norm}+${scantime}")
|
||||
((scansfound_norm++))
|
||||
@@ -911,15 +906,33 @@ STATUS_SCANTIMES(){
|
||||
scantimes_norm_xtr=$(bc <<< "scale=2; ${scantimes_norm_xtr}+${scantime}")
|
||||
((scansfound_norm_xtr++))
|
||||
fi
|
||||
elif [ ${scanrun} -eq 1 ]; then
|
||||
if [ ${scantime} -lt 60 ]; then
|
||||
scantimes_repl=$(bc <<< "scale=2; ${scantimes_repl}+${scantime}")
|
||||
((scansfound_repl++))
|
||||
else
|
||||
scantimes_repl_xtr=$(bc <<< "scale=2; ${scantimes_repl_xtr}+${scantime}")
|
||||
((scansfound_repl_xtr++))
|
||||
fi
|
||||
elif [ ${scanrun} -eq 2 ]; then
|
||||
if [ ${scantime} -lt 60 ]; then
|
||||
scantimes_replchk=$(bc <<< "scale=2; ${scantimes_replchk}+${scantime}")
|
||||
((scansfound_replchk++))
|
||||
else
|
||||
scantimes_replchk_xtr=$(bc <<< "scale=2; ${scantimes_replchk_xtr}+${scantime}")
|
||||
((scansfound_replchk_xtr++))
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
scantimes_total_norm=$(expr ${scantimes_norm} + ${scantimes_norm_xtr})
|
||||
scantimes_total_repl=$(expr ${scantimes_repl} + ${scantimes_repl_xtr})
|
||||
scantimes_total=$(expr ${scantimes_total_norm} + ${scantimes_total_repl})
|
||||
scantimes_total_replchk=$(expr ${scantimes_replchk} + ${scantimes_replchk_xtr})
|
||||
scantimes_total=$(expr ${scantimes_total_norm} + ${scantimes_total_repl} + ${scantimes_total_replchk})
|
||||
scansfound_total_norm=$(expr ${scansfound_norm} + ${scansfound_norm_xtr})
|
||||
scansfound_total_repl=$(expr ${scansfound_repl} + ${scansfound_repl_xtr})
|
||||
scansfound_total=$(expr ${scansfound_total_norm} + ${scansfound_total_repl})
|
||||
scansfound_total_replchk=$(expr ${scansfound_replchk} + ${scansfound_replchk_xtr})
|
||||
scansfound_total=$(expr ${scansfound_total_norm} + ${scansfound_total_repl} + ${scansfound_total_replchk})
|
||||
|
||||
[ ${scansfound_norm} -eq 0 ] && average_norm=0 || average_norm=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_norm}/${scansfound_norm}") 0)
|
||||
[ ${scansfound_norm_xtr} -eq 0 ] && average_norm_xtr=0 || average_norm_xtr=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_norm_xtr}/${scansfound_norm_xtr}") 0)
|
||||
@@ -927,6 +940,9 @@ STATUS_SCANTIMES(){
|
||||
[ ${scansfound_repl} -eq 0 ] && average_repl=0 || average_repl=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_repl}/${scansfound_repl}") 0)
|
||||
[ ${scansfound_repl_xtr} -eq 0 ] && average_repl_xtr=0 || average_repl_xtr=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_repl_xtr}/${scansfound_repl_xtr}") 0)
|
||||
[ ${scansfound_total_repl} -eq 0 ] && average_total_repl=0 || average_total_repl=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_total_repl}/${scansfound_total_repl}") 0)
|
||||
[ ${scansfound_replchk} -eq 0 ] && average_replchk=0 || average_replchk=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_replchk}/${scansfound_replchk}") 0)
|
||||
[ ${scansfound_replchk_xtr} -eq 0 ] && average_replchk_xtr=0 || average_replchk_xtr=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_replchk_xtr}/${scansfound_replchk_xtr}") 0)
|
||||
[ ${scansfound_total_replchk} -eq 0 ] && average_total_replchk=0 || average_total_replchk=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_total_replchk}/${scansfound_total_replchk}") 0)
|
||||
[ ${scansfound_total} -eq 0 ] && average_total=0 || average_total=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_total}/${scansfound_total}") 0)
|
||||
|
||||
cw=`expr $(echo "${#average_norm} ${#average_norm_xtr} ${#average_repl} ${#average_repl_xtr} ${#average_total_norm} ${#average_total_replt} ${#average_total}" | grep -oE '[0-9]+' | sort -n | tail -n 1) + 1`
|
||||
@@ -936,6 +952,9 @@ STATUS_SCANTIMES(){
|
||||
average_repl_disp=$(SHOW_TIME ${average_repl} s); c=0; spcARD=''; spc1=`expr ${cw} - ${#average_repl}`; until [ $c = ${spc1} ]; do spcARD="${spcARD} "; c=`expr $c + 1`; done
|
||||
average_repl_xtr_disp=$(SHOW_TIME ${average_repl_xtr} s); c=0; spcARXD=''; spc1=`expr ${cw} - ${#average_repl_xtr}`; until [ $c = ${spc1} ]; do spcARXD="${spcARXD} "; c=`expr $c + 1`; done
|
||||
average_total_repl_disp=$(SHOW_TIME ${average_total_repl} s); c=0; spcATRD=''; spc1=`expr ${cw} - ${#average_total_repl}`; until [ $c = ${spc1} ]; do spcATRD="${spcATRD} "; c=`expr $c + 1`; done
|
||||
average_replchk_disp=$(SHOW_TIME ${average_replchk} s); c=0; spcARCD=''; spc1=`expr ${cw} - ${#average_replchk}`; until [ $c = ${spc1} ]; do spcARCD="${spcARCD} "; c=`expr $c + 1`; done
|
||||
average_replchk_xtr_disp=$(SHOW_TIME ${average_replchk_xtr} s); c=0; spcARCXD=''; spc1=`expr ${cw} - ${#average_replchk_xtr}`; until [ $c = ${spc1} ]; do spcARCXD="${spcARCXD} "; c=`expr $c + 1`; done
|
||||
average_total_replchk_disp=$(SHOW_TIME ${average_total_replchk} s); c=0; spcATRCD=''; spc1=`expr ${cw} - ${#average_total_replchk}`; until [ $c = ${spc1} ]; do spcATRCD="${spcATRCD} "; c=`expr $c + 1`; done
|
||||
average_total_disp=$(SHOW_TIME ${average_total} s); c=0; spcATD=''; spc1=`expr ${cw} - ${#average_total}`; until [ $c = ${spc1} ]; do spcATD="${spcATD} "; c=`expr $c + 1`; done
|
||||
|
||||
lastscantime_disp=$(SHOW_TIME ${lastscantime} s)
|
||||
@@ -959,6 +978,11 @@ STATUS_SCANTIMES(){
|
||||
DIVIDER . lightCyan 60
|
||||
echo -e "${idsCL[Cyan]} - Normal `IDS_NUMBER_FORMAT ${scansfound_repl}` ${idsCL[Cyan]}(${average_repl}s)${spcARD}${idsCL[LightCyan]}${average_repl_disp}${idsCL[Default]}"
|
||||
echo -e "${idsCL[Cyan]} - Long `IDS_NUMBER_FORMAT ${scansfound_repl_xtr}` ${idsCL[Cyan]}(${average_repl_xtr}s)${spcARXD}${idsCL[LightCyan]}${average_repl_xtr_disp}${idsCL[Default]}"
|
||||
DIVIDER . lightCyan 60
|
||||
echo -e "${idsCL[Green]} w/Repl. & Clean `IDS_NUMBER_FORMAT ${scansfound_total_replchk}` ${idsCL[Green]}(${average_total_replchk}s)${spcATRCD}${idsCL[LightGreen]}${average_total_replchk_disp}${idsCL[Default]}"
|
||||
DIVIDER . lightCyan 60
|
||||
echo -e "${idsCL[Cyan]} - Normal `IDS_NUMBER_FORMAT ${scansfound_replchk}` ${idsCL[Cyan]}(${average_replchk}s)${spcARCD}${idsCL[LightCyan]}${average_replchk_disp}${idsCL[Default]}"
|
||||
echo -e "${idsCL[Cyan]} - Long `IDS_NUMBER_FORMAT ${scansfound_replchk_xtr}` ${idsCL[Cyan]}(${average_replchk_xtr}s)${spcARCXD}${idsCL[LightCyan]}${average_replchk_xtr_disp}${idsCL[Default]}"
|
||||
echo
|
||||
echo -e "${idsCL[LightCyan]}Longest Scan Time : ${idsCL[Green]}(${longest_scantime}s) ${idsCL[LightGreen]}${longest_scantime_disp}${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightCyan]}Longest Scan Date : ${idsCL[LightGreen]}${longest_scandate}${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user