diff options
-rwxr-xr-x | routers.sh | 2 | ||||
-rwxr-xr-x | test.sh | 12 |
2 files changed, 13 insertions, 1 deletions
@@ -7,7 +7,7 @@ I=0 for R in $ROUTERS; do echo "=== Runnining on 192.168.1.$R ===" - ssh -i ~/router root@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 @@ -0,0 +1,12 @@ +#!/bin/sh + +ssh -i ~/router root@192.168.1.1 -- killall python3 +# Stop current running master if any +ssh -i ~/router root@192.168.1.1 -- /etc/init.d/turtetris-slave restart + +# Remove old one +ssh -i ~/router root@192.168.1.1 -- rm -rf turtetris_master +# Deploy +scp -i ~/router -r turtetris_master root@192.168.1.1: +# Run +ssh -i ~/router root@192.168.1.1 -- python3 -m turtetris_master |