forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.sh
More file actions
39 lines (37 loc) · 1.48 KB
/
version.sh
File metadata and controls
39 lines (37 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Add release branch system configuration if non-existent
release_branch_check=$(cat $HESTIA/conf/hestia.conf | grep RELEASE_BRANCH)
if [ -z "$release_branch_check" ]; then
echo "(*) Adding global release branch variable to system configuration..."
sed -i "/RELEASE_BRANCH/d" $HESTIA/conf/hestia.conf
echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
fi
# Step through version upgrade scripts in order as necessary to ensure that systems
# are properly upgraded if skipping versions.
if [ $VERSION = "$version" ]; then
echo "(!) The latest version of Hestia Control Panel ($version) is already installed."
echo " Verifying configuration..."
echo ""
source /usr/local/hestia/install/upgrade/versions/$version.sh
VERSION="$version"
fi
if [ $VERSION = "0.9.8-27" ] || [ $VERSION = "0.9.8-28" ]; then
source /usr/local/hestia/install/upgrade/versions/0.9.8-29.sh
VERSION="0.9.8-29"
fi
if [ $VERSION = "0.9.8-29" ]; then
source /usr/local/hestia/install/upgrade/versions/1.00.0-190618.sh
VERSION="1.00.0-190618"
fi
if [ $VERSION = "0.10.00" ] || [ $VERSION = "1.00.0-190618" ] || [ $VERSION = "1.00.0-190621" ]; then
source /usr/local/hestia/install/upgrade/versions/1.0.1.sh
VERSION="1.0.1"
fi
if [ $VERSION = "1.0.1" ]; then
source /usr/local/hestia/install/upgrade/versions/1.0.2.sh
VERSION="$version"
fi
if [ $VERSION = "1.0.2" ]; then
source /usr/local/hestia/install/upgrade/versions/$version.sh
VERSION="$version"
fi