11#! /bin/bash
2+ HESTIA=" /usr/local/hestia"
3+ HESTIA_BACKUP=" /root/hst_upgrade/$( date +%d%m%Y%H%M) "
4+
5+ # load hestia.conf
6+ source $HESTIA /conf/hestia.conf
27
38# Set version(s)
49pma_v=' 4.8.5'
510
11+ # Initialize backup directory
12+ mkdir -p $HESTIA_BACKUP /templates/
13+ mkdir -p $HESTIA_BACKUP /packages/
14+
15+ # load hestia main functions
16+ source /usr/local/hestia/func/main.sh
17+
618# Upgrade phpMyAdmin
719if [ " $DB_SYSTEM " = ' mysql' ]; then
820 # Display upgrade information
@@ -58,7 +70,6 @@ if [ ! -z "$BACKEND_PORT" ]; then
5870 /usr/local/hestia/bin/v-change-sys-port $BACKEND_PORT
5971fi
6072
61-
6273# Update default page templates
6374echo ' ************************************************************************'
6475echo " Replacing default templates and packages... "
@@ -76,8 +87,6 @@ if [ -d $HESTIA/data/templates/ ]; then
7687 cp -rf $HESTIA /data/templates $HESTIA_BACKUP /
7788 $HESTIA /bin/v-update-web-templates
7889 $HESTIA /bin/v-update-dns-templates
79- $HESTIA /bin/v-update-mail-templates
80- $HESTIA /bin/v-update-sys-packages
8190fi
8291
8392# Remove old Office 365 template as there is a newer version with an updated name
@@ -150,12 +159,12 @@ if [ -f /etc/roundcube/main.inc.php ]; then
150159 sed -i " s/\['flag_for_deletion'] = 'Purge';/\['flag_for_deletion'] = false;/gI" /etc/roundcube/main.inc.php
151160fi
152161
153- # Copy default "Success" page for unassigned hosts
154- cp -rf /usr/local/hestia/ install/ubuntu/18.04/templates/web/unassigned/ * /var/www/
155-
156- # Move clamav to proper location - https://goo.gl/zNuM11
157- if [ ! -d /usr/local/hestia/web/edit/server/clamav-daemon ]; then
158- mv /usr/local/hestia/web/edit/server/clamd /usr/local/web/edit/server/clamav-daemon
162+ # Remove old OS-specific installation files if they exist to free up space
163+ if [ -d $HESTIA / install/ubuntu ] ; then
164+ rm -rf $HESTIA /install/ubuntu
165+ fi
166+ if [ -d $HESTIA /install/debian ]; then
167+ rm -rf $HESTIA /install/debian
159168fi
160169
161170# Fix dovecot configuration
172181# Rebuild mailboxes
173182for user in ` ls /usr/local/hestia/data/users/` ; do
174183 v-rebuild-mail-domains $user
175- done
184+ done
185+
186+ # Move clamav to proper location - https://goo.gl/zNuM11
187+ if [ ! -d /usr/local/hestia/web/edit/server/clamav-daemon ]; then
188+ mv /usr/local/hestia/web/edit/server/clamd /usr/local/web/edit/server/clamav-daemon
189+ fi
0 commit comments