Browse Source

Merge remote-tracking branch 'upstream/main' into ipv6

asmcc 3 years ago
parent
commit
56e041f531

+ 1 - 0
bin/v-change-database-user

@@ -39,6 +39,7 @@ is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'db' 'DB' "$database"
+is_object_new 'db' 'DBUSER' "$dbuser"
 is_object_unsuspended 'db' 'DB' "$database"
 is_password_valid
 dbpass="$password"

+ 2 - 0
func/upgrade.sh

@@ -569,6 +569,8 @@ upgrade_phppgadmin() {
 			if [ ! -f /usr/share/phppgadmin/conf/config.inc.php ]; then
 				ln -s /etc/phppgadmin/config.inc.php /usr/share/phppgadmin/conf
 			fi
+
+			rm -f phppgadmin-v$pga_v.tar.gz
 		fi
 	fi
 }

+ 4 - 0
install/deb/logrotate/httpd-prerotate/awstats

@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Changes made by HestiaCP due to https://github.com/hestiacp/hestiacp/issues/3289
+/usr/local/hestia/bin/v-update-sys-queue webstats

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

@@ -1045,6 +1045,8 @@ systemctl restart ssh
 
 # Disable AWStats cron
 rm -f /etc/cron.d/awstats
+# Replace awstatst function
+cp -f $HESTIA_INSTALL_DIR/logrotate/httpd-prerotate/* /etc/logrotate.d/httpd-prerotate/
 
 # Set directory color
 if [ -z "$(grep 'LS_COLORS="$LS_COLORS:di=00;33"' /etc/profile)" ]; then
@@ -1670,6 +1672,7 @@ if [ "$postgresql" = 'yes' ]; then
 		cp -f $HESTIA_INSTALL_DIR/pga/phppgadmin.conf /etc/apache2/conf.d/phppgadmin.inc
 	fi
 
+	rm phppgadmin-v$pga_v.tar.gz
 	write_config_value "DB_PGA_ALIAS" "phppgadmin"
 	$HESTIA/bin/v-change-sys-db-alias 'pga' "phppgadmin"
 fi
@@ -2143,9 +2146,9 @@ Ready to get started? Log in using the following credentials:
 
 	Admin URL:  https://$servername:$port"
 if [ "$host_ip" != "$ip" ]; then
-	echo "	Backup URL:  https://$ip:$port"
+	echo -n "	Backup URL: https://$ip:$port"
 fi
-echo -e " 	Username:   admin
+echo -e -n " 	Username:   admin
 	Password:   $displaypass
 
 Thank you for choosing Hestia Control Panel to power your full stack web server,

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

@@ -1044,6 +1044,8 @@ systemctl restart ssh
 
 # Disable AWStats cron
 rm -f /etc/cron.d/awstats
+# Replace awstatst function
+cp -f $HESTIA_INSTALL_DIR/logrotate/httpd-prerotate/* /etc/logrotate.d/httpd-prerotate/
 
 # Set directory color
 if [ -z "$(grep 'LS_COLORS="$LS_COLORS:di=00;33"' /etc/profile)" ]; then
@@ -1749,6 +1751,7 @@ if [ "$postgresql" = 'yes' ]; then
 		cp -f $HESTIA_INSTALL_DIR/pga/phppgadmin.conf /etc/apache2/conf.d/phppgadmin.inc
 	fi
 
+	rm phppgadmin-v$pga_v.tar.gz
 	write_config_value "DB_PGA_ALIAS" "phppgadmin"
 	$HESTIA/bin/v-change-sys-db-alias 'pga' "phppgadmin"
 fi
@@ -2227,11 +2230,11 @@ You have successfully installed Hestia Control Panel on your server.
 
 Ready to get started? Log in using the following credentials:
 
-	Admin URL:  https://$servername:$port"
+	Admin URL:  https://$servername:$port" > $tmpfile
 if [ "$host_ip" != "$ip" ]; then
-	echo "	Backup URL:  https://$ip:$port"
+	echo "	Backup URL: https://$ip:$port" >> $tmpfile
 fi
-echo -e " 	Username:   admin
+echo -e -n " 	Username:   admin
 	Password:   $displaypass
 
 Thank you for choosing Hestia Control Panel to power your full stack web server,
@@ -2256,7 +2259,7 @@ Sincerely yours,
 The Hestia Control Panel development team
 
 Made with love & pride by the open-source community around the world.
-" > $tmpfile
+" >> $tmpfile
 
 send_mail="$HESTIA/web/inc/mail-wrapper.php"
 cat $tmpfile | $send_mail -s "Hestia Control Panel" $email

+ 6 - 0
install/upgrade/versions/1.7.0.sh

@@ -100,6 +100,12 @@ if echo "$BACKUP_SYSTEM" | grep "google" > /dev/null; then
 	add_upgrade_message "Deprecation notice: Backup via Google Cloud has been removed setup backup again via Rclone to reinstate the backup and restore capebilities!"
 fi
 
+if [ -f /etc/logrotate.d/httpd-prerotate/awstats ]; then
+	echo "[ * ] Update Awstats prerotate to Hestia update method"
+	# Replace awstatst function
+	cp -f $HESTIA_INSTALL_DIR/logrotate/httpd-prerotate/awstats /etc/logrotate.d/httpd-prerotate/
+fi
+
 if [ "$PHPMYADMIN_KEY" != "" ]; then
 	echo "[ * ] Refresh hestia-sso for PMA..."
 	$BIN/v-delete-sys-pma-sso quiet