diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 8501f143..35091e5e 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -165,7 +165,11 @@ STATUS(){ fi if [ "${checkhost}" != "false" ]; then if [ "${ST_ACTION}" != "check" ]; then - uptime=`${NCMD} uptime -p` + if [ "${ST_ACTION}" = "report" ] && [ "${3}" != "email" ]; then + uptime=`${NCMD} uptime -p` + elif [ "${ST_ACTION}" != "report" ]; then + uptime=`${NCMD} uptime -p` + fi echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_NODETYPES[$NTYPE]}-Node${nid} (${nip})${idsST[Reset]}${idsCL[LightCyan]} - ${uptime} ${idsCL[LightYello]}${LH}${idsCL[Default]}" DIVIDER false green fi @@ -2426,7 +2430,7 @@ if [ ${action-x} ]; then touch "${FOLDER}/status-check.running" if [ "${2}" = "report" ]; then rm -f ${FOLDER}/status-check.lastrun - STATUS report > ${FOLDER}/status-check.lastrun + STATUS report ${3} > ${FOLDER}/status-check.lastrun if [ "${3}" = "email" ] && [ "${STATUS_CHECK_EMAIL}" != "" ]; then echo -e "\n\n" >> ${FOLDER}/status-check.lastrun DOWNLIST report >> ${FOLDER}/status-check.lastrun @@ -2435,7 +2439,7 @@ if [ ${action-x} ]; then echo -e "Status Report\n${STATUSLOG}" | mail -s "Status Report" 9208839613@mms.att.net fi else - STATUS ${2} + STATUS ${2} ${3} fi rm -f "${FOLDER}/status-check.running" else