* set curl timeout for fetching ip-address to non fractional number, because on some systems catching error about max-time option as "expected a proper numerical parameter"
* use regex for update ip
This commit is contained in:
@ -5,7 +5,7 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "$CURRENT_DIR/helpers.sh"
|
||||
|
||||
print_ip_address() {
|
||||
local ip_address=$(curl --max-time 1.5 --silent http://ip.me)
|
||||
local ip_address=$(curl --max-time 2 --silent http://ip.me)
|
||||
echo ${ip_address}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user