]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/VentoyWeb.sh
Fix typo in Czech translation (#2252)
[Ventoy.git] / INSTALL / VentoyWeb.sh
index bb6a910acb4ee93f8bc1dce62bf826cb6c35820d..537348aac5862b0d6b306628730b5dec977695d3 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 print_usage() {    
     echo 'Usage:  VentoyWeb.sh [ OPTION ]'   
@@ -23,10 +23,12 @@ fi
 
 OLDDIR=$(pwd)
 
-if uname -a | egrep -q 'aarch64|arm64'; then
+if uname -m | grep -E -q 'aarch64|arm64'; then
     TOOLDIR=aarch64
-elif uname -a | egrep -q 'x86_64|amd64'; then
+elif uname -m | grep -E -q 'x86_64|amd64'; then
     TOOLDIR=x86_64
+elif uname -m | grep -E -q 'mips64'; then
+    TOOLDIR=mips64el
 else
     TOOLDIR=i386
 fi
@@ -43,6 +45,7 @@ if [ ! -f ./boot/boot.img ]; then
     if [ -d ./grub ]; then
         echo "Don't run VentoyWeb.sh here, please download the released install package, and run the script in it."
     else
+        echo "Current directory is $PWD"
         echo "Please run under the correct directory!" 
     fi
     exit 1
@@ -97,6 +100,11 @@ if [ -f ./tool/$TOOLDIR/V2DServer.xz ]; then
     chmod +x ./tool/$TOOLDIR/V2DServer
 fi
 
+
+V2DServer "$HOST" "$PORT" &
+wID=$!
+sleep 1
+
 vtVer=$(cat ventoy/version)
 echo ""
 echo "==============================================================="
@@ -112,7 +120,7 @@ echo ""
 echo "################## Press Ctrl + C to exit #####################"
 echo ""
 
-V2DServer "$HOST" "$PORT"
+wait $wID
 
 if [ -n "$OLDDIR" ]; then 
     CURDIR=$(pwd)