jhj0517 commited on
Commit
661d31e
1 Parent(s): 35245db

refactor and added share arg

Browse files
Files changed (1) hide show
  1. user-start-webui.bat +9 -11
user-start-webui.bat CHANGED
@@ -1,19 +1,14 @@
 
1
  @echo off
2
 
3
- :: Set default values
4
  set SERVER_NAME=
5
  set SERVER_PORT=
6
  set USERNAME=
7
  set PASSWORD=
 
8
 
9
- :: Uncomment and set the values for the optional arguments
10
-
11
- :: set SERVER_NAME=0.0.0.0
12
- :: set SERVER_PORT=36540
13
- :: set USERNAME=your_username
14
- :: set PASSWORD=your_password
15
-
16
- :: Check if the arguments are uncommented and set them accordingly
17
  if not "%SERVER_NAME%"=="" (
18
  set SERVER_NAME_ARG=--server_name %SERVER_NAME%
19
  )
@@ -26,7 +21,10 @@ if not "%USERNAME%"=="" (
26
  if not "%PASSWORD%"=="" (
27
  set PASSWORD_ARG=--password %PASSWORD%
28
  )
 
 
 
29
 
30
  :: Call the original .bat script with optional arguments
31
- start-webui.bat %SERVER_NAME_ARG% %SERVER_PORT_ARG% %USERNAME_ARG% %PASSWORD_ARG%
32
- pause
 
1
+ :: This batch file is for launching with command line args
2
  @echo off
3
 
4
+ :: Set values
5
  set SERVER_NAME=
6
  set SERVER_PORT=
7
  set USERNAME=
8
  set PASSWORD=
9
+ set SHARE=
10
 
11
+ :: Set args accordingly
 
 
 
 
 
 
 
12
  if not "%SERVER_NAME%"=="" (
13
  set SERVER_NAME_ARG=--server_name %SERVER_NAME%
14
  )
 
21
  if not "%PASSWORD%"=="" (
22
  set PASSWORD_ARG=--password %PASSWORD%
23
  )
24
+ if /I "%SHARE%"=="true" (
25
+ set SHARE_ARG=--share
26
+ )
27
 
28
  :: Call the original .bat script with optional arguments
29
+ start-webui.bat %SERVER_NAME_ARG% %SERVER_PORT_ARG% %USERNAME_ARG% %PASSWORD_ARG% %SHARE_ARG%
30
+ pause