AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Solved [CS:GO]Autorestart on crash (https://forums.alliedmods.net/showthread.php?t=300512)

Ghost34 08-19-2017 18:39

[CS:GO]Autorestart on crash
 
Does someone know a program/script that restarts the server after crash?

DarkDeviL 08-19-2017 21:36

Re: [CS:GO]Autorestart on crash
 
The srcds_run wrapper script provided by Valve is already re-starting the sever after crash.

ambn 08-20-2017 02:24

Re: [CS:GO]Autorestart on crash
 
Quote:

Originally Posted by Ghost34 (Post 2542932)
Does someone know a program/script that restarts the server after crash?

if your are on linux then it restarts by default on crash but you can try adding -autoupdate as well,
on windows you cannot do it without an outter script that wait for your server to crash then restarts it,

so for windows you may first disable Windows Stop working dialog. after that you need a command-line script which do the restart for you:
Code:

@echo off
goto reload
:reload
cd /d "CSGOSERVER_DIR (where srcds.exe is located)"
echo Starting Server ...
start /wait srcds.exe  -console -game csgo -usercon -ip "IPADDRESS" -port PORT +game_type 0 +game_mode 1 +mapgroup MAPGROUP_NAME +map MAPNAME +hostname "HOSTNAME"
echo Server Has Crashed %time% >> log.txt
echo =================================== >> log.txt
echo restarting server in 5 seconds.
echo restarting server in 5 seconds. >> log.txt
timeout 5
goto reload

save it as run.bat then you're done.

Ghost34 08-20-2017 04:52

Re: [CS:GO]Autorestart on crash
 
Thank you for the fast response :)


All times are GMT -4. The time now is 09:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.