l gg23: add restart_router script

This commit is contained in:
lassulus 2023-01-18 20:09:02 +01:00
parent 07f7b076ae
commit 4e7e830dce

View File

@ -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
'')
];
}