#!/usr/bin/env bash if ! curl -s -f http://127.0.0.1:8080/config.txt > /dev/null; then echo "!!!!!!!!!!!!! please start server" exit 1 fi SSH_OPTS="-o StrictHostKeyChecking=no" ssh $SSH_OPTS root@192.168.42.6 "cli request system zeroize" echo "sleeping for 80s, then ping until up" sleep 80 while true; do if ping -w 1 -c 1 192.168.42.6 > /dev/null; then break fi done echo "finished"