@@ -17,6 +17,16 @@ mkdir -p $HESTIA_BACKUP/packages/
1717
1818echo " (*) Upgrading to Hestia Control Panel v$VERSION ..."
1919
20+ # Update Apache and NGINX configuration to support new file structure
21+ if [ -f /etc/apache2/apache.conf ]; then
22+ echo " (*) Updating Apache configuration..."
23+ cp -f $HESTIA /install/deb/apache2/apache.conf /etc/apache2/apache.conf
24+ fi
25+ if [ -f /etc/nginx/nginx.conf ]; then
26+ echo " (*) Updating nginx configuration..."
27+ cp -f $HESTIA /install/deb/nginx/nginx.conf /etc/nginx/nginx.conf
28+ fi
29+
2030# Generating dhparam.
2131if [ ! -e /etc/ssl/dhparam.pem ]; then
2232 echo " (*) Enabling HTTPS Strict Transport Security (HSTS) support"
@@ -167,16 +177,21 @@ if [ -z "$IMAP_SYSTEM" ]; then
167177 fi
168178fi
169179
170- # Rebuild mailboxes
171- for user in ` ls /usr/local/hestia/data/users/` ; do
172- echo " (*) Rebuilding mail domains for user: $user ..."
173- v-rebuild-mail-domains $user
174- done
175-
176180# Remove Webalizer and replace it with awstats as default
177181echo " (*) Setting awstats as default web statistics backend..."
178182apt purge webalizer -y > /dev/null 2>&1
179183sed -i " s/STATS_SYSTEM='webalizer,awstats'/STATS_SYSTEM='awstats'/g" $HESTIA /conf/hestia.conf
180184
181185# Run sftp jail once
182- $HESTIA /bin/v-add-sys-sftp-jail
186+ $HESTIA /bin/v-add-sys-sftp-jail
187+
188+ # Rebuild user
189+ for user in ` ls /usr/local/hestia/data/users/` ; do
190+ echo " (*) Rebuilding domains and account for user: $user ..."
191+ v-rebuild-web-domains $user
192+ sleep 0.5
193+ v-rebuild-dns-domains $user
194+ sleep 0.5
195+ v-rebuild-mail-domains $user
196+ sleep 0.5
197+ done
0 commit comments