Update INSTALL.sh

This commit is contained in:
Stefan Pejcic 2024-06-03 19:52:19 +02:00 committed by GitHub
parent d720828ff8
commit 6e4952f263
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@
# Usage: cd /home && (curl -sSL https://get.openpanel.co || wget -O - https://get.openpanel.co) | bash
# Author: Stefan Pejcic
# Created: 11.07.2023
# Last Modified: 02.06.2024
# Last Modified: 03.06.2024
# Company: openpanel.co
# Copyright (c) OPENPANEL
#
@ -178,7 +178,9 @@ current_ip=$(curl -s https://ip.openpanel.co || wget -qO- https://ip.openpanel.c
# If site is not available, get the ipv4 from the hostname -I
if [ -z "$current_ip" ]; then
current_ip=$(hostname -I | awk '{print $1}')
# current_ip=$(hostname -I | awk '{print $1}')
# ip addr command is more reliable then hostname - to avoid getting private ip
current_ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
fi