Add Human Activity Sensor

This commit is contained in:
Dejvino
2020-12-17 20:09:45 +01:00
parent 4208bc54c7
commit 059d555463
8 changed files with 106 additions and 94 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
LAST_SEEN_FILE=/var/tmp/human_last_seen
LAST_CHECKED_FILE=/var/tmp/human_last_checked
LAST_SEEN=`stat /var/tmp/human_last_seen --format=%Y`
TIME_NOW=`date +%s`
AGO=$(( $TIME_NOW - $LAST_SEEN ))
echo $AGO