Jump to content
  • 0

Fire Daemon help


err0r

Question

I have been setting up my box for auto restarts and thought id give FireDaemon a try for my BEC restarts but my question to someone who uses it is there a way to tie the BEC services to the Arma2 services so they will start/stop/restart as one?

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 0

I don't know why everyone is using this FireDaemon. All you need is BEC and a batch file:

 

run the shutdown command in bec, then one second after call this bat:
 

timeout 1
taskkill /im bec.exe

timeout 3

:: start the server..
set dayzpath="C:\Users\Server\Desktop\DayZ Epoch"
cd /d %dayzpath%
start /b /min "Dayz Epoch Server" "DayZ_Epoch_instance_11_Chernarus.bat"

timeout 20
:: start bec
cd\
cd /d "C:\Users\Server\Desktop\DayZ Epoch\instance_11_Chernarus\BattlEye\Bec"  
start /min Bec.exe -f Config.cfg

cls
@exit

 

The server will start up again 5 seconds after shutdown. BEC starts 20 seconds after server begins to load again. This is so BEC doesn't load until the server is almost fully loaded and ready for players to keep potential timeout problems from arising.

 

 

I also use a batch to start my server to make it faster:

:: start the server..
cd /d "C:\Users\Server\Desktop\DayZ Epoch"
start /min "Dayz Epoch Server" "DayZ_Epoch_instance_11_Chernarus.bat"

timeout 30

:: start bec
cd\
cd /d "C:\Users\Server\Desktop\DayZ Epoch\instance_11_Chernarus\BattlEye\Bec"  
start /min Bec.exe -f Config.cfg

cls
@exit

 
(files by me and grave)
Link to comment
Share on other sites

  • 0

 

I don't know why everyone is using this FireDaemon. All you need is BEC and a batch file:

 

run the shutdown command in bec, then one second after call this bat:
 

timeout 1
taskkill /im bec.exe

timeout 3

:: start the server..
set dayzpath="C:\Users\Server\Desktop\DayZ Epoch"
cd /d %dayzpath%
start /b /min "Dayz Epoch Server" "DayZ_Epoch_instance_11_Chernarus.bat"

timeout 20
:: start bec
cd\
cd /d "C:\Users\Server\Desktop\DayZ Epoch\instance_11_Chernarus\BattlEye\Bec"  
start /min Bec.exe -f Config.cfg

cls
@exit

 

The server will start up again 5 seconds after shutdown. BEC starts 20 seconds after server begins to load again. This is so BEC doesn't load until the server is almost fully loaded and ready for players to keep potential timeout problems from arising.

 

 

I also use a batch to start my server to make it faster:

:: start the server..
cd /d "C:\Users\Server\Desktop\DayZ Epoch"
start /min "Dayz Epoch Server" "DayZ_Epoch_instance_11_Chernarus.bat"

timeout 30

:: start bec
cd\
cd /d "C:\Users\Server\Desktop\DayZ Epoch\instance_11_Chernarus\BattlEye\Bec"  
start /min Bec.exe -f Config.cfg

cls
@exit

 
(files by me and grave)

 

 

Let me know what happens when BEC fails to start or your server crashes :)

Link to comment
Share on other sites

  • 0

 

I don't know why everyone is using this FireDaemon. All you need is BEC and a batch file:

 

run the shutdown command in bec, then one second after call this bat:
 

timeout 1
taskkill /im bec.exe

timeout 3

:: start the server..
set dayzpath="C:\Users\Server\Desktop\DayZ Epoch"
cd /d %dayzpath%
start /b /min "Dayz Epoch Server" "DayZ_Epoch_instance_11_Chernarus.bat"

timeout 20
:: start bec
cd\
cd /d "C:\Users\Server\Desktop\DayZ Epoch\instance_11_Chernarus\BattlEye\Bec"  
start /min Bec.exe -f Config.cfg

cls
@exit

 

The server will start up again 5 seconds after shutdown. BEC starts 20 seconds after server begins to load again. This is so BEC doesn't load until the server is almost fully loaded and ready for players to keep potential timeout problems from arising.

 

 

I also use a batch to start my server to make it faster:

:: start the server..
cd /d "C:\Users\Server\Desktop\DayZ Epoch"
start /min "Dayz Epoch Server" "DayZ_Epoch_instance_11_Chernarus.bat"

timeout 30

:: start bec
cd\
cd /d "C:\Users\Server\Desktop\DayZ Epoch\instance_11_Chernarus\BattlEye\Bec"  
start /min Bec.exe -f Config.cfg

cls
@exit

 
(files by me and grave)

 

Because Firedaemon auto starts the files incase your server crashes ?

Link to comment
Share on other sites

  • 0

Yea i have it setup like this already just wondering if there was another way.

I  personally dislike dependencies.  Also I don't trust the bec scheduler either.  Some swear by it but I'll stick to my batch scripts.

 

Anyways, here's a nice warning tool I wrote, all it does is connect to your server, send the messages, and then disconnect.  The source is released in GPLv3 so it is open source and free to edit/distribute so long as it remains open source and you include the GPLv3 license with it.

https://github.com/deadfred666/DayZServerRestart

 

To use it, download from github, goto the bin directory and run like so (from command line or batch file)

ServerRestartDeluxe.exe server=127.0.0.1 port=2302 pass=1234

I have a windows scheduled task to run every 4 hours, starting at 3:45 AM.  This will give your players a 15 min warning, 5,4,3,2,1 min warning so that nobody gets surprised and says "oh I didn't know it was restarting..."

 

heads up, the XML support is untested but should work.  I haven't touched it in over a year so not sure how well it works but in theory you should be able to make an XML cfg file for each of your servers and call the serverrestartdeluxe.exe and point it to a xml file as so:

 

ServerRestartDeluxe.exe --configfile=config.xml
Link to comment
Share on other sites

  • 0

Let me know what happens when BEC fails to start or your server crashes :)

Hi, I also want to start using firedaemon as you are right, batch files combined with BEC don't cover the server exe crashing.

 

quick question, I have found the firedaemon tutorial for Bec and the one for Epoch but, what should I set to make them coexist? do you have one as a dependency on the other and add a delay?

 

Also, I want to keep BEC controlling the normal server restarts and only use firedaemon to cover the server exe crashing. Will firedaemon automatically try to restart the server if it is down for it's scheduled restart...?

 

Thanks for any help. :)

Link to comment
Share on other sites

  • 0

you can still use #shutdown to stop the server.

 

I just force a task kill on the .exe to make sure it's dead.

:Kill Tasks
echo.
echo.
echo KILL arma2oaserverEpochChernarus.exe
taskkill /F /IM arma2oaserverEpochChernarus.exe
echo.
ping 127.0.0.1 -n 5 >NUL
echo.
echo KILL /Force arma2oaserverEpochChernarus.exe
taskkill /F /IM arma2oaserverEpochChernarus.exe
echo.
ping 127.0.0.1 -n 5 >NUL
echo.
echo KILL Battleye Extended Control - Bec
taskkill /F /IM BecEpochChernarus.exe
echo.
ping 127.0.0.1 -n 5 >NUL
echo.
Link to comment
Share on other sites

  • 0

 

you can still use #shutdown to stop the server.

 

I just force a task kill on the .exe to make sure it's dead.

:Kill Tasks
echo.
echo.
echo KILL arma2oaserverEpochChernarus.exe
taskkill /F /IM arma2oaserverEpochChernarus.exe
echo.
ping 127.0.0.1 -n 5 >NUL
echo.
echo KILL /Force arma2oaserverEpochChernarus.exe
taskkill /F /IM arma2oaserverEpochChernarus.exe
echo.
ping 127.0.0.1 -n 5 >NUL
echo.
echo KILL Battleye Extended Control - Bec
taskkill /F /IM BecEpochChernarus.exe
echo.
ping 127.0.0.1 -n 5 >NUL
echo.

Thanks again cen. So do you call this after the shutdown command from BEC? Like a second afterwards or something? 

Link to comment
Share on other sites

  • 0

In my BEC scheduler I actually call a .bat file with that code inside it:

<job id='5'>
		<day>1,2,3,4,5,6,7</day>
		<start>015900</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server will restart in 1 minute</cmd>
	</job>	
	
	<job id='6'>
		<day>1,2,3,4,5,6,7</day>
		<start>020000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>REPLACEPATHTO\Arma 2 Operation Arrowhead\Kill_DayZEpoch_Chernarus_Server.bat</cmd>
	</job>
Link to comment
Share on other sites

  • 0

 

In my BEC scheduler I actually call a .bat file with that code inside it:

<job id='5'>
		<day>1,2,3,4,5,6,7</day>
		<start>015900</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server will restart in 1 minute</cmd>
	</job>	
	
	<job id='6'>
		<day>1,2,3,4,5,6,7</day>
		<start>020000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>REPLACEPATHTO\Arma 2 Operation Arrowhead\Kill_DayZEpoch_Chernarus_Server.bat</cmd>
	</job>

Ah, I see and then you don't have to use the BEC shutdown command at all as your batch file handles it...nice :)

 

Thanks for sharing cen. How's ATD going... ?

Link to comment
Share on other sites

  • 0

So for those of you that are running FireDaemon successfully, how did you do it, including BEC and scheduler.xml integration?

 

I'm running a main server and a test server on hosted bare iron (Win Server 2012R2 installed).  I had to enable Interactive Services Detection in order for FD to even work properly since ISD is no longer enabled by default.   I now have FD running and want to set processor affinity so my test instance and main instance don't step on each other.  So I imported the .XML config files from FD for both BEC and Arma2/Epoch and changed paths, etc. for ,my servers.  So first problem, where does the /affinity go?  I put it in the parameters string and get an "unknown hive error".  Anyway, I have four FD processes running.  1 - main server, 2 - main server BEC, 3 - test server, 4 - test server BEC.  They all start OK and if the Armas stop, FD restarts them.  But although the BEC processes are running, they cannot connect to the servers and therefore the scheduler never runs - so no in-game messages and no #shutdown.  They are referencing the proper Arma instances because I went to move my test server files to another location and couldn't move the BEC folder because something (the BEC FD process) had it open.  Once I stopped the process, I could move the directory and files.  I've gone over the BEC tabs in FD over and over and cannot see anything obvious that is wrong.  So is there something subtle that I missed?

 

Thanks,

Bob

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...