Bruiser

NEVERMIND- WENT ANOTHER ROUTE>good script editor needed Should be easy for most of you

8 posts in this topic

ok, so I have a bat file that starts my server. I would like it so when I start my server it will eventually timeout and restart the server on a timer.

here is what I have. if I shut down my server while the bat file is running the timer will run out and restart just like it is suppose to..

the problem is i have a blank cmd window until I do that.. I'll show pics.

I made it restart every 2 mins for testing purposes. 

now when I close the server console the timeer starts.... 

how do I make it so the time start without shutting down the server first. as you can see the server started after the 2 min countdown.

 

restartpic.PNG

restartpic2.PNG

restartpic3.PNG

 

Went this route instead.. so far its working. I'll let you know when 100% tested.

Posted Thursday at 8:29 AM (edited) · Report post

Description

If you are looking for a solution to start / restart your server in windows here's a quick and easy way to do it.

I have a .bat file that will start my exile server and keep it up when it crashes or restarts.

In order for this to work you need to change a file in exile_server.pbo. You can of course use the overwrite in the mission file config for an easier implementation.

The code that was added will shutdown your server after the restart messages. The bat will pickup on the fact that the server process no longer exists and will start it again.

How to install

Download the updated file from here http://highstrike.net/arma/files/ExileServer_system_rcon_thread_check.sqf

Unpack your mission file and make a new folder called "restart" there and add ExileServer_system_rcon_thread_check.sqf in there.
Next open your config.cpp from your mission and go to CfgExileCustomCode and add it there

class CfgExileCustomCode 
{
	ExileServer_system_rcon_thread_check = "restart\ExileServer_system_rcon_thread_check.sqf";

	...
	other stuff here -hopefully the sp3 unofficial ones
	...
}

My arma3server.exe is located in T:\Arma3\A3Master
My .bat file is located in T:\Arma3
If you place your .bat next to your arma3server.exe you need to remove the 'cd A3Master' part from it.

@echo off
cls

set version=0.9.19
set wat=Arma3 Exile

title %wat% Watchdog
cd A3Master

:watchdog
echo (%time%) %wat% started.
start "Exile" /wait /high "arma3server.exe" -port=2302 "-serverMod=@ExileServer;@marma" "-mod=@Exile;" "-config=@ExileServer\config.cfg" "-cfg=@ExileServer\basic.cfg" -profiles=config_exile -name=exile -malloc=tbbmalloc -autoinit -enableHT
echo (%time%) %wat% closed or crashed, restarting.
goto watchdog

 

Edited Thursday at 8:37 AM by Seth^^ 
clarification
Edited by Bruiser

Share this post


Link to post
Share on other sites
Advertisement

Ins't there supposed to be a }; at the end?

class CfgExileCustomCode 
{
	ExileServer_system_rcon_thread_check = "restart\ExileServer_system_rcon_thread_check.sqf";

	...
	other stuff here -hopefully the sp3 unofficial ones
	...
}

 

Share this post


Link to post
Share on other sites

OK I think I figured it out. It's not binarized any more and can be adjusted via Notepad++ now. 

Will update if this works or not.  

 

Update: Works well.

 

Thank you sir. 

 

MODS please sticky.. and hopefully also add to next update.. this makes your auto reboot so much easier. 

Edited by Falcon911

Share this post


Link to post
Share on other sites

It keeps freezing at the loading bar when it says 'starting session'. anyhting i need to do? 

Edited by DeanL

Share this post


Link to post
Share on other sites

I know it not this scripts fault. But it seems only at night it does not reboot the server. I mean in 24 hours the system will not start again from 0 hours. I have to manually restart it. 

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.