]>
glassweightruler.freedombox.rocks Git - Ventoy.git/blob - INSTALL/VentoyWebDeepin.sh
3 if echo "$*" | grep -q '[-]v'; then
8 echo 'Usage: VentoyWebDeepin.sh [ OPTION ]'
9 echo ' OPTION: (optional)'
10 echo ' -H x.x.x.x http server IP address (default is 127.0.0.1)'
11 echo ' -p PORT http server PORT (default is 24680)'
12 echo ' -h print this help'
13 echo ' -v print verbose info'
25 if [ -n "$name" -a "$name" != "root" ]; then
30 if [ -n "$name" -a "$name" != "root" ]; then
36 if [ $uid -ne 0 ]; then
42 if uname
-m | egrep -q 'aarch64|arm64'; then
44 elif uname
-m | egrep -q 'x86_64|amd64'; then
46 elif uname
-m | egrep -q 'mips64'; then
52 if [ ! -f .
/tool
/$TOOLDIR/V2DServer
]; then
53 if [ -f ${0%VentoyWebDeepin.sh}/tool
/$TOOLDIR/V2DServer
]; then
54 cd ${0%VentoyWebDeepin.sh}
58 PATH
=.
/tool
/$TOOLDIR:$PATH
60 if [ ! -f .
/boot
/boot.img
]; then
61 if [ -d .
/grub
]; then
62 echo "Don't run VentoyWebDeepin.sh here, please download the released install package, and run the script in it."
64 echo "Please run under the correct directory!"
73 if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
76 elif [ "$1" = "-v" ]; then
78 elif [ "$1" = "-H" ]; then
80 if echo $1 | grep -q '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'; then
83 print_err
"Invalid host $1"
86 elif [ "$1" = "-p" ]; then
88 if [ $1 -gt 0 -a $1 -le 65535 ]; then
91 print_err
"Invalid port $1"
100 if ps
-ef | grep "V2DServer.*$HOST.*$PORT" | grep -q -v grep; then
101 print_err
"Another ventoy server is running now, please close it first."
105 if grep -q -i uos
/etc
/os
-release; then
108 . .
/tool
/WebDeepin.sh