From f5c67445e9f806034a6b47d7369f4b2b8b56e1b0 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Thu, 23 Jun 2016 19:35:43 +0200 Subject: [PATCH] startup scripts: use mosquitto Signed-off-by: Ralf Ramsauer --- doorlockd/scripts/post_lock | 4 +++- doorlockd/scripts/post_unlock | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doorlockd/scripts/post_lock b/doorlockd/scripts/post_lock index 872ecee..f86be9b 100755 --- a/doorlockd/scripts/post_lock +++ b/doorlockd/scripts/post_lock @@ -1,3 +1,5 @@ #!/bin/bash -wget -O /dev/null --timeout 3 "http://homer.binary.kitchen/set?color=000000" > /dev/null 2>&1 +# Send command twice +mosquitto_pub -h sushi.binary.kitchen -t kitchen/shutdown -m "" +mosquitto_pub -h sushi.binary.kitchen -t kitchen/shutdown -m "" diff --git a/doorlockd/scripts/post_unlock b/doorlockd/scripts/post_unlock index fcdfab3..1a82d5a 100755 --- a/doorlockd/scripts/post_unlock +++ b/doorlockd/scripts/post_unlock @@ -1,3 +1,4 @@ #!/bin/bash -wget -O /dev/null --timeout 3 "http://homer.binary.kitchen/set?color=0000FF" > /dev/null 2>&1 +# Set blue moodlights +mosquitto_pub -h sushi.binary.kitchen -t "kitchen/moodlights/set/a" -m "#0000ff"