]>
glassweightruler.freedombox.rocks Git - Ventoy.git/blob - INSTALL/VentoyWebDeepin.sh
4 echo 'Usage: VentoyWebDeepin.sh [ OPTION ]'
5 echo ' OPTION: (optional)'
6 echo ' -H x.x.x.x http server IP address (default is 127.0.0.1)'
7 echo ' -p PORT http server PORT (default is 24680)'
8 echo ' -h print this help'
20 if [ -n "$name" -a "$name" != "root" ]; then
25 if [ -n "$name" -a "$name" != "root" ]; then
31 if [ $uid -ne 0 ]; then
37 if uname
-m | egrep -q 'aarch64|arm64'; then
39 elif uname
-m | egrep -q 'x86_64|amd64'; then
41 elif uname
-m | egrep -q 'mips64'; then
47 if [ ! -f .
/tool
/$TOOLDIR/V2DServer
]; then
48 if [ -f ${0%VentoyWebDeepin.sh}/tool
/$TOOLDIR/V2DServer
]; then
49 cd ${0%VentoyWebDeepin.sh}
53 PATH
=.
/tool
/$TOOLDIR:$PATH
55 if [ ! -f .
/boot
/boot.img
]; then
56 if [ -d .
/grub
]; then
57 echo "Don't run VentoyWebDeepin.sh here, please download the released install package, and run the script in it."
59 echo "Please run under the correct directory!"
68 if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
71 elif [ "$1" = "-H" ]; then
73 if echo $1 | grep -q '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'; then
76 print_err
"Invalid host $1"
79 elif [ "$1" = "-p" ]; then
81 if [ $1 -gt 0 -a $1 -le 65535 ]; then
84 print_err
"Invalid port $1"
93 if ps
-ef | grep "V2DServer.*$HOST.*$PORT" | grep -q -v grep; then
94 print_err
"Another ventoy server is running now, please close it first."
98 if grep -q -i uos
/etc
/os
-release; then
101 . .
/tool
/WebDeepin.sh