Raphael Schneeberger 7 лет назад
Родитель
Сommit
100af9a6c7
1 измененных файлов с 12 добавлено и 13 удалено
  1. 12 13
      install/hst-migration.sh

+ 12 - 13
install/hst-migration.sh

@@ -9,6 +9,18 @@
 #   Ubuntu 14.04, 16.04, 18.04
 #
 
+# Detect OS
+case $os in
+    Debian)     type="debian" ;;
+    Ubuntu)     type="ubuntu" ;;
+    *)          type="NoSupport" ;;
+esac
+
+# Check if OS is supported
+if [ "$type" = "NoSupport" ]; then
+    echo "Your OS is currently not supported."
+    exit 1;
+fi
 # Detect Codename
 if [ "$type" = "debian" ]; then
     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
     exit 1
 fi
 
-# Detect OS
-case $os in
-    Debian)     type="debian" ;;
-    Ubuntu)     type="ubuntu" ;;
-    *)          type="NoSupport" ;;
-esac
-
-# Check if OS is supported
-if [ "$type" = "NoSupport" ]; then
-    echo "Your OS is currently not supported."
-    exit 1;
-fi
-
 # Check if Vesta is installed
 if [ -f /usr/local/vesta/conf/vesta.conf ]; then
     source /usr/local/vesta/conf/vesta.conf