Update powerwall.sh
This commit is contained in:
10
powerwall.sh
10
powerwall.sh
@@ -176,7 +176,7 @@ CHECKTEMP_SERVICE(){
|
|||||||
cw=20
|
cw=20
|
||||||
declare -A last_temp
|
declare -A last_temp
|
||||||
while true; do
|
while true; do
|
||||||
start=`date +%s`
|
# start=`date +%s`
|
||||||
if [ ! -f ${PW_TMPFOLDER}/temp.* ] && [ $(date +%H)$(date +%M) -ge 0700 ] && [ $(date +%H)$(date +%M) -lt 0705 ]; then
|
if [ ! -f ${PW_TMPFOLDER}/temp.* ] && [ $(date +%H)$(date +%M) -ge 0700 ] && [ $(date +%H)$(date +%M) -lt 0705 ]; then
|
||||||
if [ ! -f ${PW_TMPFOLDER}/.sentdaily ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.sentdaily)) -gt 600 ]; then
|
if [ ! -f ${PW_TMPFOLDER}/.sentdaily ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.sentdaily)) -gt 600 ]; then
|
||||||
touch ${PW_TMPFOLDER}/.sentdaily
|
touch ${PW_TMPFOLDER}/.sentdaily
|
||||||
@@ -387,12 +387,8 @@ CHECKTEMP_SERVICE(){
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
end=`date +%s`
|
# end=`date +%s`; runtime=$((end-start)); echo "runtime: ${runtime}, pausing for 60secs..."
|
||||||
runtime=$((end-start))
|
sleep 60
|
||||||
echo "runtime: ${runtime}, pausing for 60secs..."
|
|
||||||
sleep 10
|
|
||||||
echo "Here we go!!"
|
|
||||||
|
|
||||||
done # &
|
done # &
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user