Ecrit le srcipt qui liste le contenu de chaque NodeMCU en remote

This commit is contained in:
Christian Zufferey
2019-12-25 14:06:31 +01:00
parent 7b667134c6
commit 79224ea1e1
2 changed files with 36 additions and 17 deletions

17
Mesures/humidity/bolo/check_all.sh Normal file → Executable file
View File

@@ -1,6 +1,19 @@
#!/bin/bash
# Petit script pour contrôler en remote les versions d'une grappe de NodeMCU installés
#zf191223.1414
#zf191225.1403
# crée les tunnels SSH
source ./make_tunnels.sh
192.168.0.132
# On liste les fichiers de chaque nodemcu
echo -e "th1"
./luatool.py --ip localhost:$TH1_PORT --list
echo -e "th2"
./luatool.py --ip localhost:$TH2_PORT --list
echo -e "th3"
./luatool.py --ip localhost:$TH3_PORT --list
echo -e "th4"
./luatool.py --ip localhost:$TH3_PORT --list

View File

@@ -2,18 +2,28 @@
# Petit script pour créer tous les tunnels SSH sur les NodeMCU en remote
# zf191225.1352
# Définition des variables
TREMPLIN_SSH=www.zuzutest.ml
OPIZ_PORT=20223
echo -e "
Usage:
TH1_IP=192.168.8.100
TH1_PORT=23001
TH2_IP=192.168.8.101
TH2_PORT=23002
TH3_IP=192.168.8.102
TH3_PORT=23003
TH4_IP=192.168.8.103
TH4_PORT=23004
source ./make_tunnels.sh
"
read -p "continue ?"
# Définition des variables
export TREMPLIN_SSH=www.zuzutest.ml
export OPIZ_PORT=20223
export TH1_IP=192.168.8.100
export TH1_PORT=23001
export TH2_IP=192.168.8.101
export TH2_PORT=23002
export TH3_IP=192.168.8.102
export TH3_PORT=23003
export TH4_IP=192.168.8.103
export TH4_PORT=23004
# On tue tous les tunnels ssh
@@ -36,7 +46,3 @@ sleep 3
echo "end"
ps ax |grep ssh
# On liste les fichiers de chaque nodemcu
#echo -e "th1"
#/luatool.py --ip localhost:$TH1_PORT --list