File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /usr/ bin/env bash
22
33# This file is part of eRCaGuy_dotfiles: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles
44
@@ -41,6 +41,8 @@ if [ -z $IP_ADDR ]; then
4141 exit $RETURN_CODE_ERROR
4242fi
4343
44+ # TODO: WRAP THE STUFF BELOW IN A FUNCTION!
45+
4446# Capture the Ctrl + C command and specify what to do when it is pressed. This allows us to exit
4547# the otherwise unexitable infinite while loop by pressing Ctrl + C!
4648# See [see my comments under this answer too!]: https://serverfault.com/a/105390/357116
@@ -50,7 +52,7 @@ count=0
5052while true ; do
5153 echo " Attempt: $count "
5254 (( count++ ))
53- ping -c 1 -W 1 " $IP_ADDR "
55+ ping -c 1 -W 2 " $IP_ADDR "
5456
5557 return_code=$?
5658 # Exit if the IP address is alive and responding to the ping, so the return code is 0,
You can’t perform that action at this time.
0 commit comments