Skip to content

Commit 7a31702

Browse files
author
Kristan Kenney
committed
Fixes to upgrade procedures
1 parent 1b918ec commit 7a31702

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

func/upgrade.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ upgrade_init_backup() {
6666
mkdir -p $HESTIA_BACKUP/templates/
6767
}
6868

69+
upgrade_refresh_config() {
70+
source /usr/local/hestia/conf/hestia.conf
71+
source /usr/local/hestia/func/main.sh
72+
}
73+
6974
upgrade_start_routine() {
7075
#####################################################################
7176
####### Ensure that release branch variable exists #######
@@ -88,8 +93,9 @@ upgrade_start_routine() {
8893
source $HESTIA/install/upgrade/versions/previous/1.00.0-190618.sh
8994
source $HESTIA/install/upgrade/versions/previous/1.0.1.sh
9095
VERSION="1.0.1"
96+
upgrade_refresh_config
9197
fi
92-
98+
9399
#####################################################################
94100
####### Start standard upgrade process #######
95101
####### Place instructions for all post v1.0.1 builds below #######
@@ -102,18 +108,21 @@ upgrade_start_routine() {
102108
echo ""
103109
source $HESTIA/install/upgrade/versions/latest.sh
104110
VERSION="$new_version"
111+
upgrade_refresh_config
105112
fi
106113

107114
# Upgrade to Version 1.0.2
108115
if [ $VERSION = "1.0.1" ]; then
109116
source $HESTIA/install/upgrade/versions/previous/1.0.2.sh
110117
VERSION="1.0.2"
118+
upgrade_refresh_config
111119
fi
112120

113121
# Upgrade to Version 1.0.3
114122
if [ $VERSION = "1.0.2" ]; then
115123
source $HESTIA/install/upgrade/versions/latest.sh
116124
VERSION="$new_version"
125+
upgrade_refresh_config
117126
fi
118127

119128
#####################################################################
@@ -220,4 +229,5 @@ upgrade_restart_services() {
220229
# Restart SSH daemon and Hestia Control Panel service
221230
$BIN/v-restart-service ssh $restart
222231
$BIN/v-restart-service hestia $restart
223-
}
232+
}
233+

src/deb/hestia/postinst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
#!/bin/bash
22

3+
if [ ! -e "/usr/local/hestia/data/users/admin" ]; then
4+
exit
5+
fi
6+
37
###############################################################
48
# Initialize functions/variables #
59
###############################################################
6-
source /usr/local/hestia/conf/hestia.conf
7-
source /usr/local/hestia/func/main.sh
10+
11+
# Load upgrade functions and refresh variables/configuration
812
source /usr/local/hestia/func/upgrade.sh
13+
upgrade_refresh_config
914

1015
###############################################################
1116
# Set new version numbers for packages #

0 commit comments

Comments
 (0)