Skip to content

Commit 100af9a

Browse files
committed
Fix code order issue.
1 parent d9157cf commit 100af9a

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

install/hst-migration.sh

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
# Ubuntu 14.04, 16.04, 18.04
1010
#
1111

12+
# Detect OS
13+
case $os in
14+
Debian) type="debian" ;;
15+
Ubuntu) type="ubuntu" ;;
16+
*) type="NoSupport" ;;
17+
esac
18+
19+
# Check if OS is supported
20+
if [ "$type" = "NoSupport" ]; then
21+
echo "Your OS is currently not supported."
22+
exit 1;
23+
fi
1224
# Detect Codename
1325
if [ "$type" = "debian" ]; then
1426
codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
@@ -34,19 +46,6 @@ if [ "x$(id -u)" != 'x0' ]; then
3446
exit 1
3547
fi
3648

37-
# Detect OS
38-
case $os in
39-
Debian) type="debian" ;;
40-
Ubuntu) type="ubuntu" ;;
41-
*) type="NoSupport" ;;
42-
esac
43-
44-
# Check if OS is supported
45-
if [ "$type" = "NoSupport" ]; then
46-
echo "Your OS is currently not supported."
47-
exit 1;
48-
fi
49-
5049
# Check if Vesta is installed
5150
if [ -f /usr/local/vesta/conf/vesta.conf ]; then
5251
source /usr/local/vesta/conf/vesta.conf

0 commit comments

Comments
 (0)