Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add 2 scripts to record timestamps

  • Loading branch information...
commit 695edc3271950a63ddde38b2ea4fe22e83ae9910 1 parent 5f51b75
@lukec lukec authored
Showing with 15 additions and 0 deletions.
  1. +12 −0 hooks/bathroom.d/record
  2. +3 −0  hooks/plunger.d/record
View
12 hooks/bathroom.d/record
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+echo "bathroom recorder: $1 $2"
+if [ "$1" == "door" ]; then
+ if [ "$2" == "open" ]; then
+ perl -le 'print time' > status.d/last-open
+ elif [ "$2" == "closed" ]; then
+ perl -le 'print time' > status.d/last-close
+ fi
+fi
+
+
View
3  hooks/plunger.d/record
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+perl -le 'print time' > status.d/last-plunge
Please sign in to comment.
Something went wrong with that request. Please try again.