Arma3_Epoch_PrisonIsland/Server/restartserver_x64.bat

41 lines
2.1 KiB
Batchfile
Raw Normal View History

@echo off
:: Turn off all firewall rules
echo Disabling firewall rules for this server
netsh advfirewall firewall delete rule name="a3Epoch" program="d:\GameServers\Arma3\arma3epoch\Epochserver_x64.exe"
timeout 2
:: MAKE SURE ALL TASKS ARE REALLY STOPPED
echo Making sure all instances of this server have stopped
taskkill /f /fi "status eq not responding" /im Epochserver_x64.exe
taskkill /f /im Epochserver_x64.exe
timeout 2
:: Rotate Logs and backup DB
echo Rotating logs and backing up DB
start "" "d:\GameServers\Arma3\arma3epoch\Tools\log-rotator.cmd"
timeout 2
:: RESTARTING THE ARMA 3 SERVER BE SURE TO EDIT THIS TO YOUR SERVER .EXE LOCATION -NOTE ALSO THIS IS WHERE YOU DEFINE WHERE YOU CONFIG.CFG IS
echo Starting ARMA 3 Server...
::C:\Windows\System32\cmd.exe /C start "arma3" "d:\GameServers\Arma3\arma3epoch\Epochserver_x64.exe" "-mod=@Epoch;@bornholm;@CBA_A3;@CUP Units;@CUP Vehicles;@CUP Weapons;@Extended Base Objects For Epoch;" "-serverMod=@EpochHive;@A3EAI;@GMS;@Advanced Rappelling;@Advanced Sling Loading;@Advanced Towing" -config=F:\GameServers\Arma3\arma3epoch\sc\server.cfg -port=2302 -profiles=sc -cfg=F:\GameServers\Arma3\arma3epoch\sc\basic.cfg -name=sc -autoINIT -Loadmissiontomemory
2020-10-29 15:18:06 +00:00
C:\Windows\System32\cmd.exe /C start "arma3" "d:\GameServers\Arma3\arma3epoch\Epochserver_x64.exe" "-mod=@Epoch;@bornholm;" "-serverMod=@EpochHive;@A3EAI;" -config=d:\GameServers\Arma3\arma3epoch\sc\server.cfg -port=2302 -profiles=sc -cfg=d:\GameServers\Arma3\arma3epoch\sc\basic.cfg -name=sc -autoINIT -Loadmissiontomemory
echo ARMA 3 Server has started
timeout 60
:: THIS RUNS THE SERVER MONITOR FOR YOU SO YOU DON'T FORGET
echo Starting Server Monitor Loop
set ServerMonitorPath="d:\GameServers\Arma3\arma3epoch\"
cd /d %ServerMonitorPath%
start /min "" "servermonitor.bat"
echo Server Monitor has started. Have Fun
timeout 5
:: Turn On Firewall rule
timeout 10
echo Turning on Firewall Rule to allow server network traffic
netsh advfirewall firewall add rule name="a3Epoch" dir=in action=allow program="F:\GameServers\Arma3\arma3epoch\Epochserver_x64.exe" enable=yes
echo Firewall is on and players can join
timeout 5
@exit