Просмотр исходного кода

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 лет назад
Родитель
Сommit
8f718c376d
2 измененных файлов с 37 добавлено и 25 удалено
  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
 
 #----------------------------------------------------------#
-#                  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
 	# keep legacy api enabled until transition is complete
 	write_config_value "API" "yes"
@@ -1928,6 +1915,23 @@ else
 	$HESTIA/bin/v-change-sys-api disable
 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                           #
 #----------------------------------------------------------#
@@ -2096,9 +2100,12 @@ You have successfully installed Hestia Control Panel on your server.
 
 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,
 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
 		fi
 	fi
-	update-rc.d bind9 defaults
+	update-rc.d bind9 defaults > /dev/null 2>&1
 	systemctl start bind9
 
 	check_result $? "bind9 start failed"
@@ -1964,16 +1964,20 @@ echo "[ * ] Configuring File Manager..."
 $HESTIA/bin/v-add-sys-filemanager quiet
 
 #----------------------------------------------------------#
-#                  Configure PHPMailer                     #
+#                  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                           #
 #----------------------------------------------------------#
 
+echo "[ * ] Configuring System IP..."
 # Configuring system IPs
 $HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
 
@@ -1987,7 +1991,6 @@ if [ "$iptables" = 'yes' ]; then
 fi
 
 # Get public IP
-echo "[ * ] Configuring System IP..."
 pub_ip=$(curl --ipv4 -s https://ip.hestiacp.com/)
 if [ -n "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
 	if [ -e /etc/rc.local ]; then
@@ -2135,7 +2138,6 @@ fi' >> /root/.bashrc
 #                   Hestia Access Info                     #
 #----------------------------------------------------------#
 
-# Comparing hostname and IP
 host_ip=$(host $servername | head -n 1 | awk '{print $NF}')
 if [ "$host_ip" = "$ip" ]; then
 	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:
 
-    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,
 we hope that you enjoy using it as much as we do!