Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-25-2004, 10:07 PM   #1
LQ Newbie
Registered: Sep 2004
Distribution: What say you?
Posts: 6

Rep: Reputation: 0
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..

screen -A -m -d -S hlds ./hlds_run -game cstrike +ip 123.234.345.456 +port 27015 +maxplayers 20 +map map_name -autoupdate
thats just for one server. didnt feel the need to list all 4 because they are basically the same except for the ips.
Old 10-25-2004, 10:30 PM   #2
Registered: Nov 2003
Location: The Netherlands
Distribution: MDK: 10,10.1,10_amd64,9.2,9.1 . Debian: sarge,woody, Gentoo (X86 amd64 Sparc)
Posts: 219

Rep: Reputation: 30

create a script in /etc/init.d, called startServer (or something like that). The content should be:

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 :-)
Old 10-26-2004, 12:22 AM   #3
LQ Newbie
Registered: Sep 2004
Distribution: What say you?
Posts: 6

Original Poster
Rep: Reputation: 0

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.

Last edited by LtcJohnson; 10-26-2004 at 02:37 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 03:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 10:40 PM
startup script rockwell_001 Linux - General 4 04-21-2005 05:22 PM
startup script ... again. Vindane Linux - Wireless Networking 2 03-04-2005 03:57 AM
Script at startup rohde Linux - Newbie 2 09-12-2004 10:32 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration