script to flash the switch
This commit is contained in:
parent
1a4a959b5d
commit
2d8d780e34
4 changed files with 42 additions and 0 deletions
20
flash.sh
Normal file
20
flash.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
SSH_OPTS="-o StrictHostKeychecking=no"
|
||||||
|
|
||||||
|
ssh $SSH_OPTS root@192.168.42.6 "cli request system zeroize"
|
||||||
|
|
||||||
|
echo "sleeping for 10"
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
./serve.sh &
|
||||||
|
|
||||||
|
while true;
|
||||||
|
do
|
||||||
|
if ping -w 1 -c 1 192.168.42.6 > /dev/null then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "finished"
|
||||||
1
serve.sh
Executable file
1
serve.sh
Executable file
|
|
@ -0,0 +1 @@
|
||||||
|
python -m http.server 8080 -d ./serve
|
||||||
20
serve/flash.sh
Normal file
20
serve/flash.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
SSH_OPTS="-o StrictHostKeychecking=no"
|
||||||
|
|
||||||
|
ssh $SSH_OPTS root@192.168.42.6 "cli request system zeroize"
|
||||||
|
|
||||||
|
echo "sleeping for 10"
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
./serve.sh &
|
||||||
|
|
||||||
|
while true;
|
||||||
|
do
|
||||||
|
if ping -w 1 -c 1 192.168.42.6 > /dev/null then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "finished"
|
||||||
1
serve/serve.sh
Executable file
1
serve/serve.sh
Executable file
|
|
@ -0,0 +1 @@
|
||||||
|
python -m http.server 8080 -d ./serve
|
||||||
Loading…
Add table
Add a link
Reference in a new issue