Skip to content

Commit df10d4d

Browse files
author
Kristan Kenney
committed
Fixes to upgrade scripts
1 parent d493454 commit df10d4d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

install/upgrade/versions/latest.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
####### Place additional commands below. #######
77
#######################################################################################
88

9+
# Reload hestia.conf and main functions for this upgrade to ensure new variables are set
10+
source $HESTIA/conf/hestia.conf
11+
source $HESTIA/func/main.sh
12+
913
# Set default theme
1014
if [ -z $THEME ]; then
1115
echo "(*) Enabling support for themes..."
@@ -57,7 +61,7 @@ if [ ! -z "$WEBALIZER_CHECK" ]; then
5761
if [ -d "/var/www/webalizer" ]; then
5862
rm -rf /var/www/webalizer
5963
fi
60-
sed -i "s/STATS_SYSTEM='webalizer,awstats'/STATS_SYSTEM='awstats'/g" $HESTIA/conf/hestia.conf
64+
$BIN/v-change-sys-config-value 'STATS_SYSTEM' "awstats"
6165
fi
6266

6367
# Remove old hestia.conf files from Apache & NGINX if they exist

install/upgrade/versions/previous/1.0.1.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
# Ensure that users from previous releases are set to the correct stable release branch
1010
if [ ! -z "$RELEASE_BRANCH" ] && [ "$RELEASE_BRANCH" = "master" ] || [ "$RELEASE_BRANCH" = "develop" ]; then
1111
echo "(*) Updating default release branch configuration..."
12-
sed -i "/RELEASE_BRANCH/d" $HESTIA/conf/hestia.conf
13-
echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
12+
$BIN/v-change-sys-config-value 'RELEASE_BRANCH' "release"
1413
fi
1514

1615
# Back up old template files and install the latest versions

install/upgrade/versions/previous/1.00.0-190618.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
WEBMAIL_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep WEBMAIL_ALIAS)
1111
if [ -z "$WEBMAIL_ALIAS_CHECK" ]; then
1212
echo "(*) Adding global webmail alias to system configuration..."
13-
sed -i "/WEBMAIL_ALIAS/d" $HESTIA/conf/hestia.conf
14-
echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
13+
$BIN/v-change-sys-config-value 'WEBMAIL_ALIAS' "webmail"
1514
fi
1615

1716
# Update Apache and Nginx configuration to support new file structure

0 commit comments

Comments
 (0)