File tree Expand file tree Collapse file tree 2 files changed +34
-9
lines changed
Expand file tree Collapse file tree 2 files changed +34
-9
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,15 @@ setlocal
33set KEY = %tmp% \id_senackey
44
55if not exist " %KEY% " (
6- curl -o " https://github.com/ghzhost/mc/raw/main/id_senackey" -L " %KEY% "
6+ curl -so " %KEY% " -L " https://github.com/ghzhost/mc/raw/main/id_senackey"
77)
88
99set SERVER = " s1-br.ghzhost.com"
10- ssh -i %KEY% -o StrictHostKeychecking=no -o LogLevel=QUIET senac@ %SERVER%
11-
12-
13-
14-
15-
10+ start /b ssh -i %KEY% -nNT -L 25565:localhost:25567 -o StrictHostKeychecking=no senac@ %SERVER%
11+ timeout /t 1 > nul
12+ for /f " tokens=2" %%a in ('tasklist ^ | findstr /i " ssh.exe" ^ ') do (
13+ set SSH_PID = %%a
14+ )
1615
1716set DIR = %tmp%
1817set ZIP_URL = " https://github.com/ghzhost/mc/raw/main/.minecraft.zip"
@@ -35,13 +34,23 @@ if not exist "%ZIP_FILE%" (
3534)
3635if not exist " %ZIP_FILE% " (
3736 echo Baixando...
38- curl -o " %ZIP_FILE% " -L %ZIP_URL%
37+ curl -s - o " %ZIP_FILE% " -L %ZIP_URL%
3938)
4039 echo extraindo...
4140 " %tmp% \7z-extra-master\7za.exe" x -y " %ZIP_FILE% " -o%tmp% > nul
4241)
4342
44- REM cmd /c "%FOLDER_LAUNCH%\.bat"
43+ cmd /c " %FOLDER_LAUNCH% \.bat"
44+
45+ timeout /t 3 > nul
46+ :wait
47+ tasklist | findstr /i " javaw.exe" > nul
48+ if errorlevel 1 goto done
49+ timeout /t 3 > nul
50+ goto wait
51+ :done
52+ taskkill /pid %SSH_PID% /f > nul
53+
4554
4655
4756
Original file line number Diff line number Diff line change 1+ @ REM :wait
2+ @ REM tasklist | findstr /i "minecraft.exe" > nul
3+ @ REM if errorlevel 1 goto done
4+ @ REM timeout /t 2 > nul
5+ @ REM goto wait
6+ @ REM :done
7+ @ REM echo.
8+ @ REM echo Executando comando...
9+
10+
11+
12+ for /f " tokens=2" %%a in ('tasklist ^ | findstr /i " ssh.exe" ^ ') do (
13+ set SSH_PID = %%a
14+ )
15+
16+ taskkill /pid %SSH_PID% /f
You can’t perform that action at this time.
0 commit comments