Skip to content

Commit 0b5e021

Browse files
author
Kristan Kenney
committed
Add additional shims to 0.9.8-28.sh
* Create data backup directory * Load hestia.conf during upgrade * Fix default page template permissions
1 parent 4c813dd commit 0b5e021

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

install/upgrade/0.9.8-28.sh

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
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)
49
pma_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
719
if [ "$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
5971
fi
6072

61-
6273
# Update default page templates
6374
echo '************************************************************************'
6475
echo "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
8190
fi
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
151160
fi
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
159168
fi
160169

161170
# Fix dovecot configuration
@@ -172,4 +181,9 @@ fi
172181
# Rebuild mailboxes
173182
for 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

Comments
 (0)