summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/bureautomation/default.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-01-28 22:51:27 +0100
committerlassulus <lassulus@lassul.us>2019-01-28 22:51:27 +0100
commitb74a981dcf4c0cb4a17270ffb3a2b41d263d99e9 (patch)
tree59ca993e6c03550eb40d7946833623250e7b9432 /makefu/2configs/bureautomation/default.nix
parent1abab2247ed3c64b9cac6efaed22c3b214117a4f (diff)
parentdc7caec1a74f79c619e14d22ee5f0a48064dd129 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/bureautomation/default.nix')
-rw-r--r--makefu/2configs/bureautomation/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/makefu/2configs/bureautomation/default.nix b/makefu/2configs/bureautomation/default.nix
index 3897537ea..917044d63 100644
--- a/makefu/2configs/bureautomation/default.nix
+++ b/makefu/2configs/bureautomation/default.nix
@@ -5,7 +5,7 @@ let
port = 3001;
runit = pkgs.writeDash "runit" ''
set -xeuf
- PATH=${pkgs.curl}/bin:${pkgs.coreutils}/bin
+ PATH=${pkgs.mosquitto}/bin:${pkgs.coreutils}/bin
name=''${1?must provide name as first arg}
state=''${2?must provide state as second arg}
# val=''${3?must provide val as third arg}
@@ -14,9 +14,10 @@ let
test $state = alerting || exit 0
echo $name - $state
- curl 'http://bauarbeiterlampe/ay?o=1'
+ topic=plug
+ mosquitto_pub -t /bam/$topic/cmnd/POWER -m ON
sleep 5
- curl 'http://bauarbeiterlampe/ay?o=1'
+ mosquitto_pub -t /bam/$topic/cmnd/POWER -m OFF
'';
in {
services.logstash = {