Browse Source

Display always servername.com:port (#3291)

* Display always servername.com:port

With additional backup url

* Only when hostname is not resolving

* Also install Rclone

* Fix text

* Improve output

* Fix bug in backup url use ip instead

Also remove extra error
Jaap Marcus 3 years ago
parent
commit
8f718c376d
2 changed files with 37 additions and 25 deletions
  1. 25 18
      install/hst-install-debian.sh
  2. 12 7
      install/hst-install-ubuntu.sh

+ 25 - 18
install/hst-install-debian.sh

@@ -1899,23 +1899,10 @@ if [ "$sieve" = 'yes' ]; then
 fi
 fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
-#                  Configure File Manager                  #
-#----------------------------------------------------------#
-
-echo "[ * ] Configuring File Manager..."
-$HESTIA/bin/v-add-sys-filemanager quiet
-
-#----------------------------------------------------------#
-#                  Configure PHPMailer                     #
-#----------------------------------------------------------#
-
-echo "[ * ] Configuring PHP dependencies..."
-$HESTIA/bin/v-add-sys-dependencies quiet
-
-#----------------------------------------------------------#
-#                       Configure API                      #
+#                   Comfigure API                         #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
+# Configuring system IPs
 if [ "$api" = "yes" ]; then
 if [ "$api" = "yes" ]; then
 	# keep legacy api enabled until transition is complete
 	# keep legacy api enabled until transition is complete
 	write_config_value "API" "yes"
 	write_config_value "API" "yes"
@@ -1928,6 +1915,23 @@ else
 	$HESTIA/bin/v-change-sys-api disable
 	$HESTIA/bin/v-change-sys-api disable
 fi
 fi
 
 
+#----------------------------------------------------------#
+#                  Configure File Manager                  #
+#----------------------------------------------------------#
+
+echo "[ * ] Configuring File Manager..."
+$HESTIA/bin/v-add-sys-filemanager quiet
+
+#----------------------------------------------------------#
+#                  Configure dependencies                  #
+#----------------------------------------------------------#
+
+echo "[ * ] Configuring PHP dependencies..."
+$HESTIA/bin/v-add-sys-dependencies quiet
+
+echo "[ * ] Install Rclone"
+curl -s https://rclone.org/install.sh | bash > /dev/null 2>&1
+
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                   Configure IP                           #
 #                   Configure IP                           #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -2096,9 +2100,12 @@ You have successfully installed Hestia Control Panel on your server.
 
 
 Ready to get started? Log in using the following credentials:
 Ready to get started? Log in using the following credentials:
 
 
-    Admin URL:  https://$ip:$port
-    Username:   admin
-    Password:   $displaypass
+	Admin URL:  https://$servername:$port"
+if [ "$host_ip" != "$ip" ]; then
+	echo "	Backup URL:  https://$ip:$port"
+fi
+echo -e " 	Username:   admin
+	Password:   $displaypass
 
 
 Thank you for choosing Hestia Control Panel to power your full stack web server,
 Thank you for choosing Hestia Control Panel to power your full stack web server,
 we hope that you enjoy using it as much as we do!
 we hope that you enjoy using it as much as we do!

+ 12 - 7
install/hst-install-ubuntu.sh

@@ -1703,7 +1703,7 @@ if [ "$named" = 'yes' ]; then
 			systemctl restart apparmor >> $LOG
 			systemctl restart apparmor >> $LOG
 		fi
 		fi
 	fi
 	fi
-	update-rc.d bind9 defaults
+	update-rc.d bind9 defaults > /dev/null 2>&1
 	systemctl start bind9
 	systemctl start bind9
 
 
 	check_result $? "bind9 start failed"
 	check_result $? "bind9 start failed"
@@ -1964,16 +1964,20 @@ echo "[ * ] Configuring File Manager..."
 $HESTIA/bin/v-add-sys-filemanager quiet
 $HESTIA/bin/v-add-sys-filemanager quiet
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
-#                  Configure PHPMailer                     #
+#                  Configure dependencies                  #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 echo "[ * ] Configuring PHP dependencies..."
 echo "[ * ] Configuring PHP dependencies..."
 $HESTIA/bin/v-add-sys-dependencies quiet
 $HESTIA/bin/v-add-sys-dependencies quiet
 
 
+echo "[ * ] Install Rclone"
+curl -s https://rclone.org/install.sh | bash > /dev/null 2>&1
+
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                   Configure IP                           #
 #                   Configure IP                           #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
+echo "[ * ] Configuring System IP..."
 # Configuring system IPs
 # Configuring system IPs
 $HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
 $HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
 
 
@@ -1987,7 +1991,6 @@ if [ "$iptables" = 'yes' ]; then
 fi
 fi
 
 
 # Get public IP
 # Get public IP
-echo "[ * ] Configuring System IP..."
 pub_ip=$(curl --ipv4 -s https://ip.hestiacp.com/)
 pub_ip=$(curl --ipv4 -s https://ip.hestiacp.com/)
 if [ -n "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
 if [ -n "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
 	if [ -e /etc/rc.local ]; then
 	if [ -e /etc/rc.local ]; then
@@ -2135,7 +2138,6 @@ fi' >> /root/.bashrc
 #                   Hestia Access Info                     #
 #                   Hestia Access Info                     #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Comparing hostname and IP
 host_ip=$(host $servername | head -n 1 | awk '{print $NF}')
 host_ip=$(host $servername | head -n 1 | awk '{print $NF}')
 if [ "$host_ip" = "$ip" ]; then
 if [ "$host_ip" = "$ip" ]; then
 	ip="$servername"
 	ip="$servername"
@@ -2152,9 +2154,12 @@ You have successfully installed Hestia Control Panel on your server.
 
 
 Ready to get started? Log in using the following credentials:
 Ready to get started? Log in using the following credentials:
 
 
-    Admin URL:  https://$ip:$port
-    Username:   admin
-    Password:   $displaypass
+	Admin URL:  https://$servername:$port"
+if [ "$host_ip" != "$ip" ]; then
+	echo "	Backup URL:  https://$ip:$port"
+fi
+echo -e " 	Username:   admin
+	Password:   $displaypass
 
 
 Thank you for choosing Hestia Control Panel to power your full stack web server,
 Thank you for choosing Hestia Control Panel to power your full stack web server,
 we hope that you enjoy using it as much as we do!
 we hope that you enjoy using it as much as we do!