added message when the average is changing

master
Level2 Pidor 2016-01-31 23:28:55 +01:00
parent 62f3acb635
commit c7cd9394f4
1 changed files with 7 additions and 1 deletions

View File

@ -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"