From 1dae42389b97b27e6c11d5bb093270e07e6fe05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 19 Sep 2017 13:25:14 +0200 Subject: Add routers access script --- routers.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 routers.sh diff --git a/routers.sh b/routers.sh new file mode 100755 index 0000000..f84faeb --- /dev/null +++ b/routers.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +#ROUTERS="1 159 190 156 104 199 136 173 245 172" +ROUTERS="1 159 189 156 104 199 135 171 244 172" + +I=0 + +for R in $ROUTERS; do + echo "=== Runnining on 192.168.1.$R ===" + ssh -i ~/router root@192.168.1.$R -- $@ + #scp -i ~/router user.lua root@192.168.1.$R:/etc/updater/user.lua + #ssh -i ~/router root@192.168.1.$R -- uci set turtetris.line=$I + #ssh -i ~/router root@192.168.1.$R -- /etc/init.d/turtetris-slave restart + #I=$(expr $I + 1) +done + +#ssh-copy-id -i ~/router root@192.168.1.$R -- cgit v1.2.3