From 4e7e830dce8597822d1916d5f6b014404f4ea1a1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 18 Jan 2023 20:09:02 +0100 Subject: l gg23: add restart_router script --- lass/2configs/gg23.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lass/2configs/gg23.nix') diff --git a/lass/2configs/gg23.nix b/lass/2configs/gg23.nix index e3a25b99..1af2fa22 100644 --- a/lass/2configs/gg23.nix +++ b/lass/2configs/gg23.nix @@ -74,4 +74,12 @@ with import ; 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 + '') + ]; } -- cgit v1.2.3