Update gerar.sh
This commit is contained in:
parent
38db3a0376
commit
eed6036658
@ -75,7 +75,7 @@ rm -rf /etc/ADM-db
|
|||||||
|
|
||||||
check_ip () {
|
check_ip () {
|
||||||
MIP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
|
MIP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
|
||||||
MIP2=$(wget -qO- ipv4.icanhazip.com)
|
MIP2=$(wget -qO- https://ipinfo.io/ip)
|
||||||
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
|
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
|
||||||
echo "$IP" > /usr/bin/vendor_code
|
echo "$IP" > /usr/bin/vendor_code
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user