Free2Code
 
Time: 2008-11-21, 09:59pm
Starting a program automatically
Subject: Starting a program automatically  ·  Posted: 2005-03-09, 08:28am
Rank: Unregistered
Hello,

I'm not sure where to post this, after asking around I was told to come here an asking the question, so here goes.

I have a game server on a linux machine, and sometimes the server crashes while I am away. I need a script that checked every 5 minutes whether the server is running, and if not, start it in a screen.

This is how I manually get the server up:
screen -dmS sphere ./spheresvr

Umm.. I'm not sure what else to say, except the system specs:
Operating system: Linux
Kernel version: 2.4.21-27.0.2.ELsmp
Apache version: 1.3.33 (Unix)
PERL version: 5.8.4
PHP version: 4.3.10
MySQL version: 4.0.22-standard
cPanel Build 10.0.0-RELEASE 112

If I am in the wrong place, could you please point me in the right direction (bear in mind I'm a total newbie to scripts and all these things )

Thank you,
Anonymous Coward
 
  Reply to this ·  Post link ·  Top
Subject: Re: Starting a program automatically  ·  Posted: 2005-03-18, 03:28pm
Rank: ? (2172)
Member #: 11609
Add a cronjob.

Run "crontab -e" to get the config file.

A guy gets on a bus and starts threatening everybody: "I'll integrate you! I'll differentiate you!!!" So everybody gets scared and runs away. Only one person stays. The guy comes up to him and says: "Aren't you scared, I'll integrate you, I'll differentiate you!!!" And the other guy says: "No, I am not scared, I am e to the power of x."
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons