Startup Script
Ok I rent a box for my clan and another clans CS servers. What I want to know is how do I make a script to start the servers with having to type the below info. I would then also want to make a script that will start all the servers when the machine is rebooted ect..
Code:
screen -A -m -d -S hlds ./hlds_run -game cstrike +ip 123.234.345.456 +port 27015 +maxplayers 20 +map map_name -autoupdate |
Ok,
create a script in /etc/init.d, called startServer (or something like that). The content should be: #!/bin/bash screen -A -m -d -S hlds ./hlds_run -game cstrike +ip 123.234.345.456 +port 27015 +maxplayers 20 +map map_name -autoupdate; After having done this, make it executable: chmod +x startServer Then create a symlink in /etc/rc5.d . cd /etc/rc5.d ln -s ../init.d/startServer S97startServer enjoy :-) |
***EDITED***
I figured out what was wrong. Ok. Is there a way I can have this script ran as a different user? and I'd want these servers to startup after everything else is loaded. |
All times are GMT -5. The time now is 11:03 AM. |