Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @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\battleye\Bec"
- goto checksv
- :checksv
- tasklist /FI "IMAGENAME eq DZSALModServer.exe" 2>NUL | find /I /N "DZSALModServer.exe">NUL
- if "%ERRORLEVEL%"=="0" goto checkbec
- cls
- echo Server is not running, taking care of it..
- goto killsv
- :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
- :loopsv
- FOR /L %%s IN (30,-1,0) DO (
- cls
- echo Server is running. Checking again in %%s seconds..
- timeout 1 >nul
- )
- goto checksv
- :killsv
- taskkill /f /im Bec.exe
- taskkill /f /im DZSALModServer.exe
- goto startsv
- :startsv
- cd "%DAYZ-SA_SERVER_LOCATION%"
- start DZSALModServer.exe -scrAllowFileWrite -config=serverDZ.cfg -port=2302 "-profiles=ServerProfiles" -dologs -adminlog -freezecheck -cpuCount=8 "-mod="
- FOR /L %%s IN (45,-1,0) DO (
- cls
- echo Initializing server, wait %%s seconds to initialize Bec..
- timeout 1 >nul
- )
- cd ..
- goto startbec
- :startbec
- cls
- cd "%BEC_LOCATION%"
- start /min Bec.exe -f Config.cfg --dsc
- cd ../../..
- goto checksv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement