diff options
author | tv <tv@krebsco.de> | 2019-02-02 09:16:32 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-02-02 09:16:32 +0100 |
commit | bca298e1a8582f5704e1e154ead6d1f866ac3206 (patch) | |
tree | 7ca3a33bc72108b392b35d8c014df0ceda33e75e /makefu/2configs/bureautomation/default.nix | |
parent | a09bf933da2d31645872f1e2332507da98fb6a00 (diff) | |
parent | e2ae92445cc439203427a58720fc394cf1ca4b44 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu/2configs/bureautomation/default.nix')
-rw-r--r-- | makefu/2configs/bureautomation/default.nix | 7 |
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 = { |