update
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
VERS='2.5.98-01012024'
|
VERS='2.5.99-01012024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report '
|
noheader=' update service dailytemp confsync -r -report '
|
||||||
|
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ CHECKTEMP_SERVICE(){
|
|||||||
SCAN_THREADS=4
|
SCAN_THREADS=4
|
||||||
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - 'Check Temp' Service Startup" >> ${PW_LOGFILE}
|
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - 'Check Temp' Service Startup" >> ${PW_LOGFILE}
|
||||||
SENDTEMPS "TEMP Service Startup" &
|
SENDTEMPS "TEMP Service Startup" &
|
||||||
|
[ -d ${PW_TMPFOLDER}/.lastinsert ] && mkdir ${PW_TMPFOLDER}/.lastinsert
|
||||||
[ -d ${PW_TMPFOLDER}/.lasttemp ] && rm -Rf ${PW_TMPFOLDER}/.lasttemp
|
[ -d ${PW_TMPFOLDER}/.lasttemp ] && rm -Rf ${PW_TMPFOLDER}/.lasttemp
|
||||||
mkdir ${PW_TMPFOLDER}/.lasttemp
|
mkdir ${PW_TMPFOLDER}/.lasttemp
|
||||||
rm -f ${PW_TMPFOLDER}/ztemprun.*
|
rm -f ${PW_TMPFOLDER}/ztemprun.*
|
||||||
@@ -593,7 +594,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f ${PW_TMPFOLDER}/${SENSOR}.insert ] && lastinsert=$(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}.insert)) || lastinsert=100000
|
[ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR} ] && lastinsert=$(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastinsert/${SENSOR})) || lastinsert=100000
|
||||||
if [ $(ls ${PW_TMPFOLDER}/temp.* 2>/dev/null | wc -l) -gt 0 ] || [ -f ${PW_TMPFOLDER}/power.ac.low ] || [ -f ${PW_TMPFOLDER}/power.dc.low ]; then
|
if [ $(ls ${PW_TMPFOLDER}/temp.* 2>/dev/null | wc -l) -gt 0 ] || [ -f ${PW_TMPFOLDER}/power.ac.low ] || [ -f ${PW_TMPFOLDER}/power.dc.low ]; then
|
||||||
wait=$(echo "scale=0; ${PW_MYSQL_LOG_INTERVAL_ABNORMAL}*60" | bc)
|
wait=$(echo "scale=0; ${PW_MYSQL_LOG_INTERVAL_ABNORMAL}*60" | bc)
|
||||||
else
|
else
|
||||||
@@ -624,7 +625,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
# if [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ]; then
|
# if [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "lacrosse" ]; then
|
||||||
# ${mysql_conn} -e "USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`) VALUES ('${PW_SENSOR_ID["${SENSORa}-Probe"]}','$(date +'%Y-%m-%d %H:%M:%S')','${temp_probe_f}')"
|
# ${mysql_conn} -e "USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`) VALUES ('${PW_SENSOR_ID["${SENSORa}-Probe"]}','$(date +'%Y-%m-%d %H:%M:%S')','${temp_probe_f}')"
|
||||||
# fi
|
# fi
|
||||||
touch ${PW_TMPFOLDER}/${SENSOR}.insert
|
touch ${PW_TMPFOLDER}/.lastinsert/${SENSOR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#### LOGGING OF SERVERROOM SENSOR DIFFERENCE
|
#### LOGGING OF SERVERROOM SENSOR DIFFERENCE
|
||||||
|
|||||||
Reference in New Issue
Block a user