Bogdan
Feb 17 2004, 05:12 PM
Hi,
Im looking for a script to restart any of my CS servers when they go down.
I mean if you load a bad map the server goes down, but this script is able to restart it without me being thre.
I know the server can be crashed and impossible to auto restart without some other modifications...
Anyone knows where i can get such a script?
TexasFishingInfo.com
Feb 17 2004, 06:13 PM
Windows or Linux?
In Windows, a performance monitor counter set to run a specified program if a certain threshold is reached. There's a resource kit tool called shutdown.
Shutdown /L /R will shutdown and reboot the local machine. You can also set the time, because I think it waits 15mins by default.
However, you'll have to give it a parameter to watch. Of course, if you're just wanting to restart IIS, you can run iisreset.
Linux is foreign to me at present.
FarCry
Feb 17 2004, 07:07 PM
Texas... i think that was kinda irrelevant, hes talking about CS not IIS
It should automaticaly restart on linux, after 10 seconds.
On windows you could create a batch file with an infinite loop around the command to start the server, eg:
@echo off
:start
... code to run cs ...
goto start
Bogdan
Feb 17 2004, 08:02 PM
Im looking at linux here.
So it does it auto?
Never knew that but i guess thats a great thing
Thanks guys
FarCry
Feb 17 2004, 08:30 PM
just look at the code, its a loop
xShijimax
May 1 2006, 11:45 PM
I know this topic is really old but can anyone figure out this loop for me...yes it works....but I want it to restart atleast 6 different programs...and have it restart all 3 if any of them go down...with a wait timer also of like 5 seconds if possible
klaude
May 2 2006, 08:40 AM
QUOTE (xShijimax)
I know this topic is really old but can anyone figure out this loop for me...yes it works....but I want it to restart atleast 6 different programs...and have it restart all 3 if any of them go down...with a wait timer also of like 5 seconds if possible
If thats the case you should make a loop that checks to see if the programs are running. If any of them arent then kill and restart their processes before going to the next iteration. You'll definately want a wait timer of 5 or 10 seconds inbetween iterations so your script won't bog the system down.
FluX
May 7 2006, 10:05 AM
Hello I noticed your little forum topic, so I was wondering if you could help me with this auto start your talking about.
I have a server and sometimes im not always able to look out for it, so I was told about this auto start you could setup.
Now how would I set that up.
My CS 1.6 Server is Stand Alone.
You said something about a batch file, first how do I create the file to edit it and add the code. Second were do I place it, and do I have to do anything else?
Thanks so much in advacned
-Kitami
FluX
May 7 2006, 10:53 AM
With some research I was able to create the file and insert the code. Now I put in the code to start the server but it brings it to the setup screen were u press Start Server, is there any way I can make it start the server also? like is there a code for that?
fpscops.com
May 7 2006, 11:34 AM
post you code, I'll see if I can help you.
FluX
May 7 2006, 12:09 PM
@echo off
:start
D:CServcerhlds.exe
goto start
fpscops.com
May 7 2006, 12:35 PM
you should add the code below to the end of your executing path:
CODE
-console -game dmc -port 27015 +exec server.cfg +maxplayers 16 +map dmc_seige
adjust that to suit your scenario.
FluX
May 7 2006, 01:33 PM
since, i got it 2 work im happy.
Now if anyone else needs help ill gladly show them to the way.
Cs code is
@echo off
:start
D:CServcerhlds.exe -console -game cstrike -port 27015 +exec server.cfg +maxplayers 24 +map cs_assault
goto start
fpscops.com
May 7 2006, 01:36 PM
Your welcome.
FluX
May 7 2006, 07:57 PM
yea sorry was just so happy, was reloading all my mods lolz.
Thanks so much.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.