fix: use ip in place of hostname from inetutils in arch
This commit is contained in:
@@ -160,8 +160,7 @@ echo -e "1. Installing required packages (curl, wget, git, jq, openssl). "
|
|||||||
|
|
||||||
case "$OS_TYPE" in
|
case "$OS_TYPE" in
|
||||||
arch)
|
arch)
|
||||||
# inetutils provides the 'hostname' command
|
pacman -Sy --noconfirm --needed curl wget git jq openssl >/dev/null || true
|
||||||
pacman -Sy --noconfirm --needed curl wget git jq openssl inetutils >/dev/null || true
|
|
||||||
;;
|
;;
|
||||||
alpine)
|
alpine)
|
||||||
sed -i '/^#.*\/community/s/^#//' /etc/apk/repositories
|
sed -i '/^#.*\/community/s/^#//' /etc/apk/repositories
|
||||||
@@ -543,7 +542,7 @@ echo -e "You can access Coolify through your Public IP: http://$(curl -4s https:
|
|||||||
|
|
||||||
set +e
|
set +e
|
||||||
DEFAULT_PRIVATE_IP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
|
DEFAULT_PRIVATE_IP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
|
||||||
PRIVATE_IPS=$(hostname -I)
|
PRIVATE_IPS=$(hostname -I 2>/dev/null || ip -o addr show scope global | awk '{print $4}' | cut -d/ -f1)
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -n "$PRIVATE_IPS" ]; then
|
if [ -n "$PRIVATE_IPS" ]; then
|
||||||
|
Reference in New Issue
Block a user