Browse Source

Add --ipv4 to prevent IPv6 address feedback and change error output.

Raphael Schneeberger 7 years ago
parent
commit
5c2302deaf
3 changed files with 5 additions and 5 deletions
  1. 1 1
      bin/v-update-sys-ip
  2. 2 2
      install/hst-install-debian.sh
  3. 2 2
      install/hst-install-ubuntu.sh

+ 1 - 1
bin/v-update-sys-ip

@@ -110,7 +110,7 @@ for ip in $ips; do
 done
 
 # Updating NAT
-pub_ip=$(curl -s https://www.hestiacp.com/what-is-my-ip/)
+pub_ip=$(curl --ipv4 -s https://www.hestiacp.com/what-is-my-ip/)
 if [ ! -e "$HESTIA/data/ips/$pub_ip" ]; then
     if [ -z "$(grep -R "$pub_ip" $HESTIA/data/ips/)" ]; then
         ip=$(ls -t $HESTIA/data/ips/ |head -n1)

+ 2 - 2
install/hst-install-debian.sh

@@ -1367,7 +1367,7 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
 fi
 
 # Configuring system ips
-$HESTIA/bin/v-update-sys-ip
+$HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
 
 # Get main ip
 ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
@@ -1382,7 +1382,7 @@ fi
 pub_ip=$(curl --ipv4 -s https://www.hestiacp.com/what-is-my-ip/)
 
 if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
-    $HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip
+    $HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip > /dev/null 2>&1
     ip=$pub_ip
 fi
 

+ 2 - 2
install/hst-install-ubuntu.sh

@@ -1339,7 +1339,7 @@ $HESTIA/bin/v-change-user-shell admin nologin
 $HESTIA/bin/v-change-user-language admin $lang
 
 # Configuring system IPs
-$HESTIA/bin/v-update-sys-ip
+$HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
 
 # Get main IP
 ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
@@ -1353,7 +1353,7 @@ fi
 pub_ip=$(curl --ipv4 -s https://www.hestiacp.com/what-is-my-ip/)
 if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
     echo "$HESTIA/bin/v-update-sys-ip" >> /etc/rc.local
-    $HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip
+    $HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip > /dev/null 2>&1
     ip=$pub_ip
 fi