added message when the average is changing
parent
62f3acb635
commit
c7cd9394f4
|
@ -71,7 +71,13 @@ do
|
||||||
echo "$p" > "$MAXFILE"
|
echo "$p" > "$MAXFILE"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
getaveragepeople > "$PRESENCY"
|
oldaverage="$(cat "$PRESENCY")"
|
||||||
|
newaverage=$(getaveragepeople)
|
||||||
|
if [ "$oldaverage" -ne "$newaverage" ]
|
||||||
|
then
|
||||||
|
logger $(basename $0) updated precency average from $oldaverage to $newaverage people
|
||||||
|
echo "$newaverage" > "$PRESENCY"
|
||||||
|
fi
|
||||||
if [ "$state" = "offline" ]
|
if [ "$state" = "offline" ]
|
||||||
then
|
then
|
||||||
state="online"
|
state="online"
|
||||||
|
|
Loading…
Reference in New Issue