A couple Linux questions.
Posted: Wed Oct 26, 2005 4:27 pm
So I am kinda new to this whole Linux thing, most of my experiance has come from the setup I did to run Crossfire, so if these are stupid I'm sorry. But I figure you guys might be able to help me out on this in ways Google hasn't yet. I love my Google, but he has let me down on these two questions.
I am using crontab to run a backup of the player files on my server twice everyday. That way I can roll players back if it is ever necessary and I chose Noon and Midnight as the two backup times. So here is my crontab entry:
0 0,12 * * * /home/lain/crossfire/backup.sh >/dev/null 2>&1
Now the nice thing is that I get two back ups at 12 hour incraments. The problem is that they are at 05:00 and 17:00. Needless to say I'm a tad confused.
Second question, I have been having touble with my server crashing when people logoff sometimes. It says:
ReadPacket got an error: Connection reset by peer
ReadPacket error 104 returning 0
Now that's not my question, because I came up with a solution that works. I have a script that runs off crontab every 10 minutes and checks to see if the sever is running, and restart it if necessary. The problem is that when the script restarts it from crontab it's opened in the background. So if I want to watch the server activity via the consol, ie. 'TTY2" or whatever, I have to restart it again manually later when I notice there was a crash. So my question is this, is it possible to tell a program to be executed in the foreground of a specific 'TTY'? That way I wouldnt have to restart it again a second time just to watch server activity?
Any pointers would be great. Thanks!
I am using crontab to run a backup of the player files on my server twice everyday. That way I can roll players back if it is ever necessary and I chose Noon and Midnight as the two backup times. So here is my crontab entry:
0 0,12 * * * /home/lain/crossfire/backup.sh >/dev/null 2>&1
Now the nice thing is that I get two back ups at 12 hour incraments. The problem is that they are at 05:00 and 17:00. Needless to say I'm a tad confused.
Second question, I have been having touble with my server crashing when people logoff sometimes. It says:
ReadPacket got an error: Connection reset by peer
ReadPacket error 104 returning 0
Now that's not my question, because I came up with a solution that works. I have a script that runs off crontab every 10 minutes and checks to see if the sever is running, and restart it if necessary. The problem is that when the script restarts it from crontab it's opened in the background. So if I want to watch the server activity via the consol, ie. 'TTY2" or whatever, I have to restart it again manually later when I notice there was a crash. So my question is this, is it possible to tell a program to be executed in the foreground of a specific 'TTY'? That way I wouldnt have to restart it again a second time just to watch server activity?
Any pointers would be great. Thanks!