mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update INSTALL.sh
This commit is contained in:
parent
d720828ff8
commit
6e4952f263
@ -5,7 +5,7 @@
|
|||||||
# Usage: cd /home && (curl -sSL https://get.openpanel.co || wget -O - https://get.openpanel.co) | bash
|
# Usage: cd /home && (curl -sSL https://get.openpanel.co || wget -O - https://get.openpanel.co) | bash
|
||||||
# Author: Stefan Pejcic
|
# Author: Stefan Pejcic
|
||||||
# Created: 11.07.2023
|
# Created: 11.07.2023
|
||||||
# Last Modified: 02.06.2024
|
# Last Modified: 03.06.2024
|
||||||
# Company: openpanel.co
|
# Company: openpanel.co
|
||||||
# Copyright (c) OPENPANEL
|
# 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 site is not available, get the ipv4 from the hostname -I
|
||||||
if [ -z "$current_ip" ]; then
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user