diff --git a/defaults.inc b/defaults.inc index 0d8a6636..38051e99 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.6.37-02262024' +VERS='2.6.38-02262024' noheader=' update service dailytemp confsync -r -report ' diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 44299ac0..e5bdcb28 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -733,7 +733,7 @@ Previous Temp: ${last_temp}${GAUGESH}" fi - ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && rm -f ${PW_TMPFOLDER}/temp.* + [[ "${SENSOR}" = *"${PW_SHUTDOWN_SENSORS}"* ]] && rm -f ${PW_TMPFOLDER}/temp.* rm -f ${PW_TMPFOLDER}/power.${SENSORa}.* if [ "${last_temp}" != "1" ]; then last_temp=1 @@ -753,7 +753,7 @@ Previous Temp: ${last_temp}${GAUGESH}" if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then - # ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && touch ${PW_TMPFOLDER}/temp.warn + # [[ "${SENSOR}" = *"${PW_SHUTDOWN_SENSORS}"* ]] && touch ${PW_TMPFOLDER}/temp.warn touch ${PW_TMPFOLDER}/temp.warn.${SENSOR} if (( $(bc <<< "${temp_diff} >= 1") )); then SENDNOTICE "${SENSOR} ${GAUGE} WARNING" "WARNING ${GAUGE}: ${temp_f}${GAUGESH} - (Difference of ${temp_diff}${GAUGESH})" 1 @@ -776,8 +776,7 @@ Previous Temp: ${last_temp}${GAUGESH}" echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR} fi - # if ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && [ ! -f ${PW_TMPFOLDER}/temp.crit ]; then - if [ "${SENSOR}" == "ServerRoomTH" ] && [ ! -f ${PW_TMPFOLDER}/temp.crit.${SENSOR} ]; then + if [[ "${SENSOR}" = *"${PW_SHUTDOWN_SENSORS}"* ]] && [ ! -f ${PW_TMPFOLDER}/temp.crit.${SENSOR} ]; then touch ${PW_TMPFOLDER}/temp.crit.${SENSOR} SHUTDOWN_MAIN ${SENSOR} & echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Shutting down MAIN servers" >> ${logtemp} @@ -798,8 +797,7 @@ Previous Temp: ${last_temp}${GAUGESH}" last_temp=${temp_f} echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR} fi - # if ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && [ ! -f ${PW_TMPFOLDER}/temp.critsys ]; then - if [ "${SENSOR}" == "ServerRoomTH" ] && [ ! -f ${PW_TMPFOLDER}/temp.critsys.${SENSOR} ]; then + if [[ "${SENSOR}" = *"${PW_SHUTDOWN_SENSORS}"* ]] && [ ! -f ${PW_TMPFOLDER}/temp.critsys.${SENSOR} ]; then touch ${PW_TMPFOLDER}/temp.critsys.${SENSOR} SHUTDOWN_SYS ${SENSOR} TEMP & SHUTDOWN_CRIT ${SENSOR} &