-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic Renaming of files. better documenting
- Loading branch information
Showing
3 changed files
with
33 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
@echo off | ||
|
||
echo initiating startup sequence. don't kill this. it'll die with the server. | ||
start "Bedrock Dedicated Server" "%~dp0\bedrock_server.exe" | ||
|
||
for /F "TOKENS=1,2,*" %%a in ('tasklist /FI "IMAGENAME eq bedrock_server.exe"') do set ServerPID=%%b | ||
echo server PID: %ServerPID% | ||
|
||
Powershell.exe -executionpolicy remotesigned -File SendWebHook.ps1 -content "Starting (Server)" | ||
echo Server Started | ||
|
||
timeout /t 20 >nul | ||
|
||
Powershell.exe -executionpolicy remotesigned -File SendWebHook.ps1 -content "Server should be running. Try connecting." | ||
echo Server is running. Hide this Window | ||
|
||
:loop | ||
tasklist | find " %ServerPID% " >nul | ||
if not errorlevel 1 ( | ||
timeout /t 10 >nul | ||
goto :loop | ||
) | ||
|
||
echo Server process died. | ||
Powershell.exe -executionpolicy remotesigned -File SendWebHook.ps1 -content "Server process died." | ||
@echo off | ||
|
||
echo initiating startup sequence. don't kill this. it'll die with the server. | ||
start "Bedrock Dedicated Server" "%~dp0\bedrock_server.exe" | ||
|
||
for /F "TOKENS=1,2,*" %%a in ('tasklist /FI "IMAGENAME eq bedrock_server.exe"') do set ServerPID=%%b | ||
echo server PID: %ServerPID% | ||
|
||
::Change up the string in here to modify the Message sent | ||
Powershell.exe -executionpolicy remotesigned -File LogToWebHook.ps1 -content "Starting (Server)" | ||
echo Server Started | ||
|
||
::Estimated server startup time | ||
|
||
timeout /t 20 >nul | ||
|
||
::look above | ||
Powershell.exe -executionpolicy remotesigned -File LogToWebHook.ps1 -content "Server should be running. Try connecting." | ||
echo Server is running. Hide this Window | ||
|
||
::Wait until Process PID not found | ||
|
||
:loop | ||
tasklist | find " %ServerPID% " >nul | ||
if not errorlevel 1 ( | ||
timeout /t 10 >nul | ||
goto :loop | ||
) | ||
echo Server process died. | ||
|
||
::You know what by now | ||
Powershell.exe -executionpolicy remotesigned -File LogToWebHook.ps1 -content "Server process died." |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters