Skip to content

Commit 5c2302d

Browse files
committed
Add --ipv4 to prevent IPv6 address feedback and change error output.
1 parent c208888 commit 5c2302d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bin/v-update-sys-ip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ for ip in $ips; do
110110
done
111111

112112
# Updating NAT
113-
pub_ip=$(curl -s https://www.hestiacp.com/what-is-my-ip/)
113+
pub_ip=$(curl --ipv4 -s https://www.hestiacp.com/what-is-my-ip/)
114114
if [ ! -e "$HESTIA/data/ips/$pub_ip" ]; then
115115
if [ -z "$(grep -R "$pub_ip" $HESTIA/data/ips/)" ]; then
116116
ip=$(ls -t $HESTIA/data/ips/ |head -n1)

install/hst-install-debian.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
13671367
fi
13681368

13691369
# Configuring system ips
1370-
$HESTIA/bin/v-update-sys-ip
1370+
$HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
13711371

13721372
# Get main ip
13731373
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
@@ -1382,7 +1382,7 @@ fi
13821382
pub_ip=$(curl --ipv4 -s https://www.hestiacp.com/what-is-my-ip/)
13831383

13841384
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
1385-
$HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip
1385+
$HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip > /dev/null 2>&1
13861386
ip=$pub_ip
13871387
fi
13881388

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ $HESTIA/bin/v-change-user-shell admin nologin
13391339
$HESTIA/bin/v-change-user-language admin $lang
13401340

13411341
# Configuring system IPs
1342-
$HESTIA/bin/v-update-sys-ip
1342+
$HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
13431343

13441344
# Get main IP
13451345
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
@@ -1353,7 +1353,7 @@ fi
13531353
pub_ip=$(curl --ipv4 -s https://www.hestiacp.com/what-is-my-ip/)
13541354
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
13551355
echo "$HESTIA/bin/v-update-sys-ip" >> /etc/rc.local
1356-
$HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip
1356+
$HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip > /dev/null 2>&1
13571357
ip=$pub_ip
13581358
fi
13591359

0 commit comments

Comments
 (0)