1
0
Fork 0

script to flash the switch

This commit is contained in:
Maurice Debray 2026-01-24 00:31:26 +01:00
parent 1a4a959b5d
commit 2d8d780e34
4 changed files with 42 additions and 0 deletions

20
flash.sh Normal file
View 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
View file

@ -0,0 +1 @@
python -m http.server 8080 -d ./serve

20
serve/flash.sh Normal file
View 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
View file

@ -0,0 +1 @@
python -m http.server 8080 -d ./serve