This commit is contained in:
2023-07-16 15:27:59 -05:00
parent ec17c0f71b
commit 0f2ef64553
2 changed files with 6 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
VERS='4.9.8-07062023'
VERS='4.9.10-07062023'
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns '
CERT_DAEMON='/snap/bin/certbot'

View File

@@ -798,20 +798,23 @@ GUI(){
[ ${fd} -lt ${cbd} ] && rm -f "${NM_FOLDER}/status-check.running"
fi
if [ ! -f "${NM_FOLDER}/status-check.running" ]; then
start_status=`date +%s`
touch "${NM_FOLDER}/status-check.running"
if [ "${2}" == "report" ]; then
start_status=`date +%s`
echo "$(date) - LOCAL - ${NODE_HOSTNAME} - Starting Status Check" >> ${NM_LOGFILE}
echo -e "$(date) - Starting status check #############################\n" > ${NM_FOLDER}/status-check.running
STATUS report ${3} >> ${NM_FOLDER}/status-check.running
echo -e "\n\n$(date) - Finished status check #############################\n" >> ${NM_FOLDER}/status-check.running
echo "$(date) - LOCAL - ${NODE_HOSTNAME} - Completed Status Check" >> ${NM_LOGFILE}
rm -f ${NM_FOLDER}/status-check.lastrun
mv ${NM_FOLDER}/status-check.running ${NM_FOLDER}/status-check.lastrun
end_status=`date +%s`
runtime_status=$((end_status-start_status))
echo -e "\nRuntime: ${runtime_status}" >> ${NM_FOLDER}/status-check.lastrun
if [ "${3}" = "email" ]; then
if [ "${3}" == "email" ]; then
echo -e "\n\n" >> ${NM_FOLDER}/status-check.lastrun
DOWNLIST report >> ${NM_FOLDER}/status-check.lastrun
STATUSLOG="$(cat ${NM_FOLDER}/status-check.lastrun)"