Restarting Unmanaged Servers

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
Awesomenessman12
New to forums
New to forums
Posts: 4
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed Jan 01, 2014 12:54 am

Restarting Unmanaged Servers

Post by Awesomenessman12 »

Hello,
I am just wondering if you can give me some code or a program so when my server says stopped responding or it crashes that it will restart by itself!

Thanks!
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Restarting Unmanaged Servers

Post by soja »

Game servers? Or windows? Linux? srcds or other?
Not a NFO employee
Awesomenessman12
New to forums
New to forums
Posts: 4
Joined: Wed Jan 01, 2014 12:54 am

Re: Restarting Unmanaged Servers

Post by Awesomenessman12 »

Well i would be running it on my vds. It has windows 2008 on it
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Restarting Unmanaged Servers

Post by soja »

Do you want to reboot the VDS itself, or a game server on the vds? If a game server, what kind?
Not a NFO employee
Awesomenessman12
New to forums
New to forums
Posts: 4
Joined: Wed Jan 01, 2014 12:54 am

Re: Restarting Unmanaged Servers

Post by Awesomenessman12 »

It is just the gameservers! It would be for garrys mod. We also run the servers of bat files not the srcds. When it crashes I would like it to restart by its self
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Restarting Unmanaged Servers

Post by soja »

Thanks for finally telling me what for -.-

This .bat file would auto restart your server after a crash:

Code: Select all

echo off
cls
echo SRCDS auto restart
title Garry's Mod auto restart
:srcds
echo (%time%) SRCDS started.
start /wait srcds.exe -game your +maxplayers command +map line
echo (%time%) Your server just closed or crashed. RESTARTING!
goto srcds
start /wait srcds.exe -game your +maxplayers command +map line -console
needs to be your own startup line.

You cannot simulate a crash using the "x" on the console window, instead type quit in the console(or rcon quit).
Not a NFO employee
Awesomenessman12
New to forums
New to forums
Posts: 4
Joined: Wed Jan 01, 2014 12:54 am

Re: Restarting Unmanaged Servers

Post by Awesomenessman12 »

So Even if it "stops working" will it auto restart
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Restarting Unmanaged Servers

Post by soja »

you need -nocrashdialog and then yes.
Not a NFO employee
User avatar
TacTicToe
This is my homepage
This is my homepage
Posts: 848
Joined: Fri Feb 18, 2011 1:08 pm
Location: USA
Contact:

Re: Restarting Unmanaged Servers

Post by TacTicToe »

I personally use Firedaemon to run all of our servers. It is friggin phenomenal.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Restarting Unmanaged Servers

Post by soja »

I used windows task scheduler for my hlstats daemons.

It checked every minute for the process, and restarted it if need be.
Not a NFO employee
Post Reply