Skip to content

Commit 7abf64a

Browse files
author
Kristan Kenney
committed
Add message output during upgrade process
Display each item that the upgrade script is processing.
1 parent c43696f commit 7abf64a

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

install/upgrade/0.9.8-28.sh

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ source /usr/local/hestia/func/main.sh
1818
# Upgrade phpMyAdmin
1919
if [ "$DB_SYSTEM" = 'mysql' ]; then
2020
# Display upgrade information
21-
echo "Upgrade phpMyAdmin to v$pma_v..."
21+
echo "(*) Upgrading phpMyAdmin to v$pma_v..."
2222

2323
# Download latest phpMyAdmin release
2424
wget --quiet https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz
@@ -71,11 +71,9 @@ if [ ! -z "$BACKEND_PORT" ]; then
7171
fi
7272

7373
# Update default page templates
74-
echo '************************************************************************'
75-
echo "Replacing default templates and packages... "
76-
echo "Existing templates have been backed up to the following location: "
77-
echo "$HESTIA_BACKUP/templates/ "
78-
echo '************************************************************************'
74+
echo "(*) Replacing default templates and packages..."
75+
echo " Existing templates have been backed up to the following location:"
76+
echo " $HESTIA_BACKUP/templates/"
7977

8078
# Back up default package and install latest version
8179
if [ -d $HESTIA/data/packages/ ]; then
@@ -138,21 +136,29 @@ chmod 751 $HESTIA/data/templates/web/unassigned/webfonts
138136
if [ "$WEB_BACKEND" = "php-fpm" ]; then
139137
echo "(!) Unassigned hosts configuration for Apache not necessary on PHP-FPM installations."
140138
elif [ "$WEB_BACKEND" = "apache2" ]; then
139+
echo "(*) Adding unassigned hosts configuration to apache2..."
141140
if [ -f /usr/local/hestia/data/ips/* ]; then
142141
for ip in /usr/local/hestia/data/ips/*; do
143142
ipaddr=${ip##*/}
144-
rm -f /etc/nginx/conf.d/$ip.conf
145-
cp -f $HESTIA/install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ipaddr.conf
146-
sed -i 's/directIP/'$ipaddr'/g' /etc/nginx/conf.d/$ipaddr.conf
147-
148143
rm -f /etc/apache2/conf.d/$ip.conf
149144
cp -f $HESTIA/install/deb/apache2/unassigned.conf /etc/apache2/conf.d/$ipaddr.conf
150145
sed -i 's/directIP/'$ipaddr'/g' /etc/apache2/conf.d/$ipaddr.conf
151146
done
152147
fi
148+
elif [ "$PROXY_SYSTEM" = "nginx" ]; then
149+
echo "(*) Adding unassigned hosts configuration to nginx.."
150+
if [ -f /usr/local/hestia/data/ips/* ]; then
151+
for ip in /usr/local/hestia/data/ips/*; do
152+
ipaddr=${ip##*/}
153+
rm -f /etc/nginx/conf.d/$ip.conf
154+
cp -f $HESTIA/install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ipaddr.conf
155+
sed -i 's/directIP/'$ipaddr'/g' /etc/nginx/conf.d/$ipaddr.conf
156+
done
157+
fi
153158
fi
154159

155160
# Set Purge to false in roundcube config - https://goo.gl/3Nja3u
161+
echo "(*) Updating Roundcube configuration..."
156162
if [ -f /etc/roundcube/config.inc.php ]; then
157163
sed -i "s/\['flag_for_deletion'] = 'Purge';/\['flag_for_deletion'] = false;/gI" /etc/roundcube/config.inc.php
158164
fi
@@ -165,13 +171,16 @@ fi
165171

166172
# Remove old OS-specific installation files if they exist to free up space
167173
if [ -d $HESTIA/install/ubuntu ]; then
174+
echo "(*) Removing old installation data files for Ubuntu..."
168175
rm -rf $HESTIA/install/ubuntu
169176
fi
170177
if [ -d $HESTIA/install/debian ]; then
178+
echo "(*) Removing old installation data files for Debian..."
171179
rm -rf $HESTIA/install/debian
172180
fi
173181

174182
# Fix dovecot configuration
183+
echo "(*) Updating dovecot IMAP/POP server configuration..."
175184
if [ -f /etc/dovecot/conf.d/15-mailboxes.conf ]; then
176185
# Remove mailboxes configuration if it exists
177186
rm -f /etc/dovecot/conf.d/15-mailboxes.conf
@@ -185,6 +194,7 @@ fi
185194

186195
# Rebuild mailboxes
187196
for user in `ls /usr/local/hestia/data/users/`; do
197+
echo "(*) Rebuilding mail domain for $user..."
188198
v-rebuild-mail-domains $user
189199
done
190200

0 commit comments

Comments
 (0)