]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/VentoyWeb.sh
Update ru_RU.json (#2114)
[Ventoy.git] / INSTALL / VentoyWeb.sh
index 9baf33b820bc7f938ac005c1ba5f7044baee1f9b..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,12 +100,17 @@ 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 "==============================================================="
 if [ "$LANG" = "zh_CN.UTF-8" ]; then
-    echo "  Ventoy Server $vtVer ÒѾ­Æô¶¯ ..."
-    echo "  Çë´ò¿ªä¯ÀÀÆ÷£¬·ÃÎÊ http://${HOST}:${PORT}"
+    echo "  Ventoy Server $vtVer 已经启动 ..."
+    echo "  请打开浏览器,访问 http://${HOST}:${PORT}"
 else
     echo "  Ventoy Server $vtVer is running ..."
     echo "  Please open your browser and visit http://${HOST}:${PORT}"
@@ -112,7 +120,7 @@ echo ""
 echo "################## Press Ctrl + C to exit #####################"
 echo ""
 
-V2DServer "$HOST" "$PORT"
+wait $wID
 
 if [ -n "$OLDDIR" ]; then 
     CURDIR=$(pwd)