summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2023-01-18 20:09:02 +0100
committerlassulus <lassulus@lassul.us>2023-01-18 20:09:02 +0100
commit4e7e830dce8597822d1916d5f6b014404f4ea1a1 (patch)
tree338a0fbf30114f9a01e274edd45c00c0e01abc3f /lass/2configs
parent07f7b076aead082dc02bc9f46d86c32aabae2e8c (diff)
l gg23: add restart_router script
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/gg23.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/lass/2configs/gg23.nix b/lass/2configs/gg23.nix
index e3a25b99d..1af2fa226 100644
--- a/lass/2configs/gg23.nix
+++ b/lass/2configs/gg23.nix
@@ -74,4 +74,12 @@ with import <stockholm/lib>;
interface=int0
'';
};
+
+ environment.systemPackages = [
+ (pkgs.writers.writeDashBin "restart_router" ''
+ ${pkgs.mosquitto}/bin/mosquitto_pub -h localhost -t 'cmnd/router/POWER' -u gg23 -P gg23-mqtt -m OFF
+ sleep 2
+ ${pkgs.mosquitto}/bin/mosquitto_pub -h localhost -t 'cmnd/router/POWER' -u gg23 -P gg23-mqtt -m ON
+ '')
+ ];
}