-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
54 lines (49 loc) · 1.17 KB
/
Copy pathstart.bat
File metadata and controls
54 lines (49 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@echo off
setlocal enabledelayedexpansion
:: simtrace-analyser-server startup script for Windows
::
:: Usage: start.bat [--capture gsmtap|direct] [--port PORT] [--db PATH] [--gsmtap-port PORT]
::
:: Options set via environment variables act as defaults; CLI flags override them.
set "CAPTURE=%CAPTURE%"
if "%CAPTURE%"=="" set "CAPTURE=gsmtap"
set "PORT=%PORT%"
if "%PORT%"=="" set "PORT=8081"
set "DB=%DB%"
set "GSMTAP_PORT=%GSMTAP_PORT%"
if "%GSMTAP_PORT%"=="" set "GSMTAP_PORT=4729"
set "EXTRA_ARGS="
:parse_args
if "%~1"=="" goto :run
if "%~1"=="--capture" (
set "CAPTURE=%~2"
shift
shift
goto :parse_args
)
if "%~1"=="--port" (
set "PORT=%~2"
shift
shift
goto :parse_args
)
if "%~1"=="--db" (
set "DB=%~2"
shift
shift
goto :parse_args
)
if "%~1"=="--gsmtap-port" (
set "GSMTAP_PORT=%~2"
shift
shift
goto :parse_args
)
set "EXTRA_ARGS=!EXTRA_ARGS! %~1"
shift
goto :parse_args
:run
echo Starting simtrace-analyser-server...
echo PWA (simtrace-analyser) will be served at http://127.0.0.1:%PORT%/
set "PYTHONPATH=%~dp0"
python -m simtrace_analyser --capture %CAPTURE% --port %PORT% --gsmtap-port %GSMTAP_PORT% %EXTRA_ARGS%