Skip to content

Commit

Permalink
Better offline detection (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Dec 29, 2023
1 parent ae8c5c9 commit 65ae1bb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .eth/ethdo/create-withdrawal-change.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ fi
echo "Checking whether machine is online"
echo
ping -c 4 1.1.1.1 && { echo; echo "Machine is online, please disconnect from Internet"; exit 1; }
ping -c 4 8.8.8.8 && { echo; echo "Machine is online, please disconnect from Internet"; exit 1; }
echo "Safely offline. Running ethdo to prep withdrawal address change."
__code=$?
if [ "$__code" -eq 2 ]; then
echo "Safely offline. Running ethdo to prep withdrawal address change."
else
echo "Ping failed, but with error code $__code - the machine may not be offline. Aborting."
exit 1
fi
echo
while true; do
read -rp "What is your desired Ethereum withdrawal address in 0x... format? : " __address
Expand Down

0 comments on commit 65ae1bb

Please sign in to comment.