forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv-change-sys-release
More file actions
executable file
·50 lines (44 loc) · 1.7 KB
/
v-change-sys-release
File metadata and controls
executable file
·50 lines (44 loc) · 1.7 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
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# info: update web templates
# options: [RESTART]
#
# The function for changing the release branch for the
# Hestia Control Panel. This allows the user to switch between
# stable and pre-release builds which will automaticlly update
# based on the appropriate release schedule if auto-update is
# turned on.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
branch=$1
# Includes
source $HESTIA/func/main.sh
source $HESTIA/conf/hestia.conf
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
if [ -z "$branch" ]; then
echo "Error: no release branch specified."
echo "Usage: v-change-sys-release branchname"
echo ""
echo "Common release branches:"
echo "(*) master: Stable releases only"
echo "(*) beta: Beta builds which are being prepared for release"
echo "(*) develop: Daily development builds"
echo ""
echo "You can also specify another branch name from the"
echo "GitHub repository to install the code from that branch."
echo ""
exit
else
# Remove old branch variable
sed -i "/RELEASE_BRANCH/d" $HESTIA/conf/hestia.conf
# Set new branch variable
echo "RELEASE_BRANCH='$branch'" >> $HESTIA/conf/hestia.conf
echo "Changed system to follow release branch: $branch"
fi
#----------------------------------------------------------#
# Hestia #
#----------------------------------------------------------#
exit