The best way to do this is to run your server from a "screen" terminal. I'm not at home right now, but if you don't get a reply by tomorrow I can post you full instructions on how to get your server running (with automatic restart on crash) pretty easily.
Ok, here is my "start_server.sh";
Code:
#!/bin/sh
echo "Starting Cs:Source Server"
sleep 1
screen -A -m -d -S css-server ./srcds_run -console +ip xxx.xxx.xxx.xxx -game cstrike +map de_aztec +maxplayers 12 -TICKRATE 66 -autoupdate -debug -vacbeta
Note that the "screen" command is all on one line. Replace xxx.xxx.xxx.xxx with your server's IP address. Change the map and max players as you need to. You may also want 33 or 100 in the TICKRATE and you may or may not want vacbeta (seems to be running fine at the moment). I have this in my hlds/source dir, which is where your srcds_run should be. If not, make sure you create the start_server.sh in the right place. You will need to
Code:
chmod +x start_server.sh
then run it. It will display "Starting Cs:Source Server" and then go back to the command line. To get your screen up again, use the command
Code:
screen -x css-server
and there is your server. To exit the terminal but leave the server running, just hold down CTRL and press A and D, and you will get back to your command line. You can kill the server by pressing CTRL and C in the screen terminal. However, if you kill the srcds_run, or it crashes, then it will be automatically restarted. My server is never off, so I don't run this command from anywhere, but if you will be turning the server on and off,
you could add it to your startup files. This will depend on your distro, mine is Slackware so I would add /usr/local/hlds/source/start_server.sh to /etc/rc.d/rc.local. Good luck.