Update powerwall.sh
This commit is contained in:
@@ -319,7 +319,7 @@ CHECKTEMP_SERVICE(){
|
|||||||
|
|
||||||
elif [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit_sys}") -eq 1 ]; then
|
elif [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit_sys}") -eq 1 ]; then
|
||||||
touch ${PW_TMPFOLDER}/temp.crit
|
touch ${PW_TMPFOLDER}/temp.crit
|
||||||
if [ ${temp_diff} -gt 1 ] || [ "${last_temp[${SENSOR}]}" = "1" ]; then
|
if [ $(bc -l <<< "${temp_diff} > 1") -eq 1 ] || [ "${last_temp[${SENSOR}]}" = "1" ]; then
|
||||||
SENDNOTICE "${SENSOR} TEMP CRITICAL" "CRITICAL TEMP: ${temp_f}'F - (Difference of ${temp_diff}')
|
SENDNOTICE "${SENSOR} TEMP CRITICAL" "CRITICAL TEMP: ${temp_f}'F - (Difference of ${temp_diff}')
|
||||||
Shutting down servers!!" 1
|
Shutting down servers!!" 1
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - CRITICAL - (Difference of ${temp_diff}'F)" >> ${logtemp}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - CRITICAL - (Difference of ${temp_diff}'F)" >> ${logtemp}
|
||||||
@@ -339,7 +339,7 @@ Shutting down servers!!" 1
|
|||||||
fi
|
fi
|
||||||
elif [ $(bc -l <<< "${temp_f} >= ${temp_crit_sys}") -eq 1 ]; then
|
elif [ $(bc -l <<< "${temp_f} >= ${temp_crit_sys}") -eq 1 ]; then
|
||||||
touch ${PW_TMPFOLDER}/temp.critsys
|
touch ${PW_TMPFOLDER}/temp.critsys
|
||||||
if [ ${temp_diff} -gt 1 ] || [ "${last_temp[${SENSOR}]}" = "1" ]; then
|
if [ $(bc -l <<< "${temp_diff} > 1") -eq 1 ] || [ "${last_temp[${SENSOR}]}" = "1" ]; then
|
||||||
SENDNOTICE "${SENSOR} TEMP CRITICAL" "SYSTEM CRITICAL TEMP: ${temp_f}'F - (Difference of ${temp_diff}')" 1
|
SENDNOTICE "${SENSOR} TEMP CRITICAL" "SYSTEM CRITICAL TEMP: ${temp_f}'F - (Difference of ${temp_diff}')" 1
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - SYSTEM CRITICAL - (Difference of ${temp_diff})" >> ${logtemp}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - SYSTEM CRITICAL - (Difference of ${temp_diff})" >> ${logtemp}
|
||||||
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - ${SENSOR} - CRITICAL TEMP SYSTEM - (Difference of ${temp_diff}')" >> ${PW_LOGFILE}
|
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - ${SENSOR} - CRITICAL TEMP SYSTEM - (Difference of ${temp_diff}')" >> ${PW_LOGFILE}
|
||||||
|
|||||||
Reference in New Issue
Block a user