Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: https://pastebin.com/atBKLxja
- @echo off
- TITLE DayZ SA Server - Status
- COLOR 0A
- :: Variables::
- ::DayZServer_64.exe path.
- set DAYZ-SA_SERVER_LOCATION="DayZ"
- ::Bec.exe path.
- set BEC_LOCATION="Dayz\ServerProfiles\BattlEye\Bec"
- ::ModServer.bat path.
- set MOD_SERVER_LOCATION="Dayz"
- ::::::::::::::
- echo Cashew
- goto startmodserver
- pause
- :startmodserver
- cd "%MOD_SERVER_LOCATION%"
- start DZSALModServer.bat
- goto checkbec
- ::This Will check if your server is running on start.
- :checksv
- tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | find /I /N "DayZServer_x64.exe">NUL
- if "%ERRORLEVEL%"=="0" goto checkbec
- cls
- echo Server is not running, taking care of it..
- goto killsv
- ::This will check if your Bec is running.
- :checkbec
- tasklist /FI "IMAGENAME eq Bec.exe" 2>NUL | find /I /N "Bec.exe">NUL
- if "%ERRORLEVEL%"=="0" goto loopsv
- cls
- echo Bec is not running, taking care of it..
- goto startbec
- ::This will check every 30 second if your server is still running.
- :loopsv
- FOR /L %%s IN (30,-1,0) DO (
- cls
- echo Server is running. Checking again in %%s seconds..
- timeout 1 >nul
- )
- goto checksv
- ::This will shutdown your Server and Bec When this task is asked.
- :killsv
- taskkill /f /im Bec.exe
- taskkill /f /im DayZServer_x64.exe
- goto startmodserver
- )
- goto startbec
- ::This will start your Bec and open up the console
- :startbec
- cd "%BEC_LOCATION%"
- start Bec.exe -f BEServer_x64.cfg --dsc
- goto checksv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement