- 0
[RELESE] Autorestart whit BEC
-
Similar Content
-
- 0 replies
- 1358 views
-
- 8 replies
- 1446 views
-
- 11 answers
- 6768 views
-
- 12 replies
- 6610 views
-
- 0 answers
- 2539 views
-
- Advertisement
Question
juandayz
////You require the bec is installed////
-------------------------------------------------------------------------------------------------------------------------------------------------
///DOING .BAT FILES///
STEP 1:
Do a .bat file called "Monitor" and paste this. (change the paths for your server routes)
@echo off
cls
echo Watching arma2oaserver For Crashes/Restarts...
echo If you want to close arma2oaserver and this script, close the arma2oaserver window and type Y depending on your language followed by Enter.
title Raklatif's Arma2OA Monitor
set becpath="C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec"
cd /d %becpath%
:arma2oaserver
start "BattleEye Extended Control" "BEC Control Epoch.bat"
echo (%time%) arma2oaserver started.
start /wait "arma2" /min /high "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -cpuCount=2 -maxmem=2047 -exThreads=1 -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;"
echo (%time%) WARNING: arma2oaserver closed or crashed, restarting.
// TIMEOUT /T 180 /NOBREAK
goto arma2oaserver
******Now paste this .bat file in your server root.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Step 2:
Do a .bat file called "BEC Control Epoch" and paste this into: (change the paths for your server)
:: KILL BATTLEYE
taskkill /im Bec.exe
timeout 1
TIMEOUT /T 60 /NOBREAK
cd\
cd "C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec"
Bec.exe -f Config.cfg --dsc
***Now paste this .bat file in ...\instance_11_Chernarus\BattlEye\Bec
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
STEP 3:
Do a .bat file called "Premod_restart" and paste this into: (change the paths for your server)
@echo off
echo Stopping server
cd C:\Users\Administrador\Desktop\Dayz Epoch Server
start /wait Premod_stop.bat
echo Backing up database
start /wait Premod_backup.bat
echo Starting BEC
cd C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec
start Bec.exe -f Config.cfg
echo Starting server
cd C:\Users\Administrador\Desktop\Dayz Epoch Server
start "arma2" /min "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;"
ping 127.0.0.1 -n 5 >NUL
***Now paste this .bat file in your server root
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
STEP 4:
Do a .bat file called "Premod_stop" and paste this into: (change the paths for your server)
@echo off
taskkill /F /IM arma2oaserver.exe
taskkill /F /IM Bec.exe
exit
***Now paste this .bat file in your server root
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/// EDITING YOUR BEC`s Files ///
STEP 5:
go to YourServerRoot\instance_11_Chernarus\BattlEye\Bec\Config and open whit Note++ your Shedule.xml
***Now u needs add this at every last shedule id job: <cmd>C:\Users\Administrador\Desktop\Dayz Epoch Server\Premod_restart.bat</cmd> (change for ur server paths)
This is my example:
<Scheduler>
<!-- 12:00 AM restart -->
<job id="0">
<time>23:45:00</time>
<delay>000000</delay>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 This server will restart in 15 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="1">
<time>23:55:00</time>
<delay>000000</delay>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 This server will restart in 5 minutes</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="2">
<time>23:59:00</time>
<delay>000000</delay>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 This server will restart in 1 minute, Log out now!</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="3">
<time>00:00:00</time>
<delay>000000</delay>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>#shutdown</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="4">
<time>00:00:10</time>
<delay>000000</delay>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>C:\Users\Administrador\Desktop\Dayz Epoch Server\Premod_restart.bat</cmd>
<cmdtype>1</cmdtype>
</job>
<!-- End 12:00 AM restart -->
***Do the same for each job id group.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
STEP 6:
Now go to YourServerRoot\instance_11_Chernarus\BattlEye\Bec\Config\ and open whit note++ your Config.cfg
Ip = 127.0.0.1
Port = 2302
BePath = C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye (Here put your Bec Path)
Admins = Admins.xml
Commands = Commands.xml
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Nothing more. Launch your server whit "Monitor.bat"
tnks ChukyN for help!
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now