Skip to content

Commit 97ad628

Browse files
committed
Adjust to load hestia conf version instead dpkg.
1 parent 65c94eb commit 97ad628

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

install/upgrade/1.00.0-190618.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@ hestiacp="$HESTIA/install/deb"
1515
# Load hestia.conf
1616
source /usr/local/hestia/conf/hestia.conf
1717

18-
# Get hestia version
19-
version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
20-
21-
function version_ge(){ test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" -o ! -z "$1" -a "$1" = "$2"; }
22-
2318
# Compare version for upgrade routine
24-
if [ "$version" != "0.9.8-28" ]; then
19+
if [ "$VERSION" != "0.9.8-28" ]; then
2520
source $HESTIA/install/upgrade/0.9.8-28.sh
2621
fi
2722

install/upgrade/1.00.0-190621.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ hestiacp="$HESTIA/install/deb"
1515
# Load hestia.conf
1616
source /usr/local/hestia/conf/hestia.conf
1717

18-
# Get hestia version
19-
version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
20-
2118
# Compare version for upgrade routine
22-
if [ "$version" != "1.00.0-190618" ] && [ "$version" != "0.10.0" ] then
19+
if [ "$VERSION" != "1.00.0-190618" ] && [ "$VERSION" != "0.10.0" ] then
2320
source $HESTIA/install/upgrade/1.00.0-190618.sh
2421
fi
2522

23+
# Get hestia version
24+
version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
25+
26+
# To Do: Write version to hestia.conf.
27+
2628
# Place additional commands below.
2729

2830
# Remove global options from nginx.conf to prevent conflicts with other web packages

0 commit comments

Comments
 (0)