Forum
Servers
Server's auto-restart
Server's auto-restart
28 repliesInstead of a million words.
Admin/mod comment
Why do you post then?! Imagine everyone who doesn't know the answer would post anyway. Please don't do that again!
§2.1 - No needless and/or doubled posts (spam) /DC
RoDioN1322 has writtenexplain to me how to do it?
Check here for your server - if not present, start it again. That's a very basic, of course. You also need to kill old process, for example.
Pseudo code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
if process("process") is running
{
return
}
else
{
restart
}
edited 3×, last 06.04.13 04:44:11 pm
Tristam: When server is crashed it's still running. Straight fail.
@
RoDioN1322: Write a script to do that for you.
oxytamine: I don't know other way, because I'm not lua programmer. Also why did you say ''Write a script to do that for you.'', if he asked how to do this? edited 1×, last 06.04.13 04:53:19 pm
Thanks, I'll check
What I'm telling you is that when server is crashed it's still running (process). You should check serverlist instead.
Avo has writtenRestarting crashed with lua? Seems legit. You would use some out program to control system's process. Or hmmm... server could write to *.txt file log with time of last server's update (for example every minute) If file is not updated for one minute, out program will run cs2d_dedicated.exe one more time.
Why so complicated dude.
Avo: This program'll open so much of cs2d_dedicated.exe processes that'll computer freeze.
oxytamine: I understand you. But this isn't the correct answer for his question bro.
Tristam has written
oxytamine: I understand you. But this isn't the correct answer for his question bro.This is the correct answer - to check CS2D serverlist to make sure that server is up and running. This tech. was used on Oxy2D without any problems.
oxytamine has writtenAlways more than one way to do something.
Cirium has writtenAlways more than one way to do something.
Always one way which is the most simple. Yet you can of course try to ping the port server is running on, Mr. I-had-to-reply-because-I-am-smart.
oxytamine has written
Cirium has writtenAlways more than one way to do something.
Always one way which is the most simple. Yet you can of course try to ping the port server is running on, Mr. I-had-to-reply-because-I-am-smart.
Ping the process? the hell?
Ever heard of something called pgrep?
Cirium has writtenPing the process? the hell?
Ping the port server is running on, idiot. <ip:port>
Cirium has writtenEver heard of something called pgrep?
1
netstat -plant|grep ":22"
Look, I found a link for you.
http://www.linux.com/learn
You'll find many interesting things there.
oxytamine has writtenAnd never use pgrep because pgrep with cron will kill your RAM.
That's inaccurate.
1 
Offline