Raised This Month: $12 Target: $400
 3% 

Solved [CS:GO]Autorestart on crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ghost34
Member
Join Date: Jul 2017
Location: In the middle of nothing
Old 08-19-2017 , 18:39   [CS:GO]Autorestart on crash
Reply With Quote #1

Does someone know a program/script that restarts the server after crash?

Last edited by Ghost34; 08-20-2017 at 04:52.
Ghost34 is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 08-19-2017 , 21:36   Re: [CS:GO]Autorestart on crash
Reply With Quote #2

The srcds_run wrapper script provided by Valve is already re-starting the sever after crash.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 08-20-2017 , 02:24   Re: [CS:GO]Autorestart on crash
Reply With Quote #3

Quote:
Originally Posted by Ghost34 View Post
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.
__________________

Last edited by ambn; 08-20-2017 at 02:26.
ambn is offline
Ghost34
Member
Join Date: Jul 2017
Location: In the middle of nothing
Old 08-20-2017 , 04:52   Re: [CS:GO]Autorestart on crash
Reply With Quote #4

Thank you for the fast response
Ghost34 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:11.


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