Warsheep

[GUIDE] organized setup/update/restart of servers (BATCH)

6 posts in this topic

Here is some example Video of the funktionality
https://youtu.be/Kloi-qRBolQ

 

I know not all will like this but for some guy this way will be perfekt like me.

all the stuff stay in google i just take all and set it up tu run correctly.

a littl debug is inside too (u can lookup all settings bevor update/restart a server (choseable)

startup parameters , path, ec all in 1 file. u dont need to search anymore. 

simple add or remove startup parameters without issus .

written for setup 2 dedicatet servers (main and Test) easy to add more

u need 5 files.bat called them:

Spoiler

ExileConfig.bat

ExileEcho.bat

ExileUpdater.bat

ExileRestarter.bat

ExileRestarter-Test.bat

in the ExileConfig put this content and change it how u need

Spoiler

@echo off
cls

::Main Settings U dont need to Edit here!
set BRANCHSTABLE=233780 -beta
set BRANCHDEV=233780 -beta development
set DIR=%CD%
set USELESS=/wait /high

::Steam Settings
set STEAM=C:\Apps\Steam\steamcmd.exe
set STEAMUSERNAME=Name
set STEAMPASSWORD=Password
set STEAMLOGIN=%STEAMUSERNAME% %STEAMPASSWORD%

::Main Startup Parameters
set NOSPLASH=-nosplash
set WORLD=-world=empty
set SKIPINTRO=-skipIntro
set MAXMEM=-maxMem=2047
set MAXVRAM=-maxVRAM=128
set WINXP=-winxp
set NOCB=-noCB
set CPUCOUNT=-cpuCount=4
set EXTHREADS=-exThreads=7
set MALLOC=-malloc=tbbmalloc
set NOLOGS=-noLogs
set ENABLEHT=-enableHT
set NOFILEPATCHING=-noFilePatching
set FILEPATCHING=-filePatching
set BETA=-beta=
set CHECKSIGNATURES=-checkSignatures
set D3DNOLOCK=-d3dNoLock
set D3DNOMULTICB=-d3dNoMultiCB
set CRASHDIAG=-crashDiag
set LOADMISSIONTOMEMORY=-loadMissionToMemor
set AUTOINIT=-autoinit
set DISABLESERVERTHRED=-disableServerThread
set DOWNLOAD=-download
set AUTOUPDATE=-autoUpdate
set USEDPARAMETERS=%NOSPLASH% %WORLD% %SKIPINTRO% %MAXMEM% %MAXVRAM% %CPUCOUNT% %EXTHREADS% %FILEPATCHING%


::Server Settings 
set WAT=Arma 3 Exile
set SERVER=%DIR%\Exile
set GAMEORDNER=%SERVER%\ExileServer
set GAMEEXE=%SERVER%\arma3server.exe
set CONFIG=-config=%GAMEORDNER%\Config\Config.cfg
set CFG=-cfg=%GAMEORDNER%\Config\Basic.cfg
set BEPATH=-bepath=%GAMEORDNER%\BattlEye
set PROFILES=-profiles=%GAMEORDNER%
set MOD=-mod=@Exile
set SERVERMOD=-servermod=@ExileServer
set PORT=-port=2302
set PID=-pid=
set IP=-ip=
set PAR=-par=
set RANKING=-ranking=
set NAME=-name=Exile
set PARAMETER=%GAMEEXE% %CONFIG% %CFG% %BEPATH% %PROFILES% %MOD% %SERVERMOD% %PORT% %NAME%

::Server Settings Testserver
set WATTEST=Arma 3 Exile Test
set SERVERTEST=%DIR%\ExileTestserver
set GAMEORDNERTEST=%SERVERTEST%\ExileServer
set GAMEEXETEST=%SERVERTEST%\arma3server.exe
set CONFIGTEST=-config=%GAMEORDNERTEST%\Config\Config.cfg
set CFGTEST=-cfg=%GAMEORDNERTEST%\Config\Basic.cfg
set PROFILESTEST=-profiles=%GAMEORDNERTEST%
set BEPATHTEST=-bepath=%GAMEORDNERTEST%\BattlEye
set MODTEST=-mod=@Exile
set SERVERMODTEST=-servermod=@ExileServer
set PORTTEST=-port=2312
set NAMETEST=-name=ExileTest
set PIDTEST=-pid=
set IPTEST=-ip=
set PARTEST=-par=
set RANKINGTEST=-ranking=
set PARAMETERTEST=%GAMEEXETEST% %CONFIGTEST% %CFGTEST% %BEPATHTEST% %PROFILESTEST% %MODTEST% %SERVERMODTEST% %PORTTEST% %NAMETEST%
 
::Echos
echo (%time%)Loading config done
echo .
echo Lockup ur settings?
echo (Y)=Yes
echo (N)=No
SET /p wahl=
if '%wahl%' == 'y' goto Echo
if '%wahl%' == 'n' goto End
:Echo
call ExileEcho.bat
:End

ExileEcho.bat

Spoiler

@echo off
::Echos
echo .
echo Main Settings
echo BranchStable: %BRANCHSTABLE%
echo BranchDev: %BRANCHDEV%
echo Dir: %DIR%
echo Useless: %USELESS%
echo .
echo Allright?
pause
echo .
echo Steam Settings
echo Steam: %STEAM%
echo SteamUser: %STEAMUSERNAME%
echo SteamPassword: %STEAMPASSWORD%
echo Steamlogin: %STEAMLOGIN%
echo .
echo Allright?
pause
echo .
echo Main Startup Parameters
echo NoSplash: %NOSPLASH%
echo World: %WORLD%
echo SkipIntro: %SKIPINTRO%
echo MaxMem: %MAXMEM%
echo MacVRam: %MAXVRAM%
echo WinXP: %WINXP%
echo NoCB: %NOCB%
echo CPUcount: %CPUCOUNT%
echo ExThreads: %EXTHREADS%
echo Malloc: %MALLOC%
echo NoLogs: %NOLOGS%
echo EnableHT: %ENABLEHT%
echo NoFilePatching: %NOFILEPATCHING%
echo FilePatching: %FILEPATCHING%
echo Beta: %BETA%
echo CheckSignatures: %CHECKSIGNATURES%
echo d3dNoLock: %D3DNOLOCK%
echo d3dNoMultiCB: %D3DNOMULTICB%
echo CrashDiag: %CRASHDIAG%
echo LoadMissionToMemory: %LOADMISSIONTOMEMORY%
echo AutoInit: %AUTOINIT%
echo DisableServerThread: %DISABLESERVERTHRED%
echo Download: %DOWNLOAD%
echo AutoUpdate: %AUTOUPDATE%
echo UsedParameters:
echo %USEDPARAMETERS%
echo .
echo Allright?
pause
echo .
echo Server Settings
echo Wat: %WAT%
echo Server: %SERVER%
echo GameFolder: %GAMEORDNER%
echo GameEXE: %GAMEEXE%
echo Config: %CONFIG%
echo CFG: %CFG%
echo Profiles: %PROFILES%
echo BePath: %BEPATH%
echo Mod: %MOD%
echo ServerMod: %SERVERMOD%
echo Port: %PORT%
echo PID: %PID%
echo IP: %IP%
echo Par: %PAR%
echo Ranking: %RANKING%
echo Name: %NAME%
echo Startup Parameters:
echo %PARAMETER%
echo .
echo Allright?
pause
echo .
echo Server Testserver
echo Wat: %WATTEST%
echo Server: %SERVERTEST%
echo GameFolder: %GAMEORDNERTEST%
echo GameEXE: %GAMEEXETEST%
echo Config: %CONFIGTEST%
echo CFG: %CFGTEST%
echo Profiles: %PROFILESTEST%
echo BePath: %BEPATHTEST%
echo Mod: %MODTEST%
echo ServerMod: %SERVERMODTEST%
echo Port: %PORTTEST%
echo PID: %PIDTEST%
echo IP: %IPTEST%
echo Par: %PARTEST%
echo Ranking: %RANKINGTEST%
echo Name: %NAMETEST%
echo Startup Parameters:
echo %PARAMETERTEST%
echo .
echo Allright?
pause
echo .

ExileUpdate.bat

Spoiler

@echo off
cls
call ExileConfig.bat
SETLOCAL ENABLEDELAYEDEXPANSION
goto Update

:Update
echo (1)=Update %WAT%?
echo (2)=Update %WATTEST%?
echo (Q)=Quit the Update?
SET /p wahl=
if '%wahl%' == '1' goto Server1
if '%wahl%' == '2' goto Server2
if '%wahl%' == 'q' goto End

:Server1
echo (%time%) Updating %WAT%.
echo .
%STEAM% +login %STEAMLOGIN% +force_install_dir "%SERVER%" +"app_update %BRANCHSTABLE%" validate +quit
echo .
echo (%time%) %WAT% updatet.
goto Update

:Server2
echo (%time%) Updating %WATTEST%.
echo .
%STEAM% +login %STEAMLOGIN% +force_install_dir "%SERVERTEST%" +"app_update %BRANCHSTABLE%" validate +quit
echo .
echo (%time%) %WATTEST% updatet.
goto Update

:End

ExileRestarter.bat

Spoiler

@echo off
cls
call ExileConfig.bat

title %WAT% Watchdog

:watchdog
echo (%time%) Starting %WAT%
start "%WAT%" %USELESS% %PARAMETER% %USEDPARAMETERS%
echo (%time%) %WAT% closed or crashed, restarting.
goto watchdog

ExileRestarter-Test.bat

Spoiler

@echo off
cls
call ExileConfig.bat

title %WATTEST% Watchdog

:watchdog
echo (%time%) Starting %WATTEST%
start "%WAT%" %USELESS% %PARAMETERTEST% %USEDPARAMETERS%
echo (%time%) %WATTEST% closed or crashed, restarting.
goto watchdog

 

when u configurate it then u can update both servers or a chosen one with the ExileUpdater.bat
and restart a chosen server with the restarter.bat

hopw this helps some of u .

Edited by Warsheep
  • Like 2

Share this post


Link to post
Share on other sites
Advertisement

Just a quick question, but aren't you setting a lot of parameters here?

set WORLD=-world=empty
set MAXMEM=-maxMem=2047
set MAXVRAM=-maxVRAM=128
set CPUCOUNT=-cpuCount=4
set EXTHREADS=-exThreads=7
set MALLOC=-malloc=tbbmalloc

::Main Startup Parameters //dosnt need to edit this 
set NOLOGS=-noLogs
set NOSPLASH=-nosplash
set SKIPINTRO=-skipIntro
set WINXP=-winxp
set NOCB=-noCB
set ENABLEHT=-enableHT
set NOFILEPATCHING=-noFilePatching
set FILEPATCHING=-filePatching
set BETA=-beta=
set CHECKSIGNATURES=-checkSignatures
set D3DNOLOCK=-d3dNoLock
set D3DNOMULTICB=-d3dNoMultiCB
set CRASHDIAG=-crashDiag
set LOADMISSIONTOMEMORY=-loadMissionToMemor
set AUTOINIT=-autoinit
set DISABLESERVERTHRED=-disableServerThread
set DOWNLOAD=-download
set AUTOUPDATE=-autoUpdate

I'm only using -HT right now, -loadmissiontomemroy, -autoinit. Do I really need all these?

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.