mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-01-08 15:50:09 +01:00
delete read
This commit is contained in:
parent
72ca23e880
commit
a14809e7c3
@ -68,14 +68,7 @@ newclient () {
|
|||||||
# and to avoid getting an IPv6.
|
# and to avoid getting an IPv6.
|
||||||
IP=$(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)
|
IP=$(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)
|
||||||
if [[ "$IP" = "" ]]; then
|
if [[ "$IP" = "" ]]; then
|
||||||
read -p "Can I search your ip on Internet ? (y|n) " search_ip
|
IP=$(wget -qO- ipv4.icanhazip.com)
|
||||||
if [[ $search_ip = "y" ]]; then
|
|
||||||
IP=$(wget -qO- ipv4.icanhazip.com)
|
|
||||||
else
|
|
||||||
echo "So, I cannot continue without the server ip...
|
|
||||||
Exiting...";exit 0;
|
|
||||||
fi
|
|
||||||
unset search_ip
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user