PDA

View Full Version : [ubuntu] Start CoD Server on Boot



Frizianz
May 4th, 2010, 07:34 AM
Hey Guys,

Whats a way to start the cod server as a specified user on system boot. Whats the best way for me to do this?
The cod server is located in the users home directory

Frizianz

Frizianz
May 5th, 2010, 02:30 AM
Bump...

TheFuturian
May 6th, 2010, 12:29 PM
This makes little sense. Do you mean a "Call of Duty" server? Is there a startup/shutdown script available for the service within /etc/init.d? If so I believe that the "update-rc.d" command can be used to set the service to run when the Server is booted.


man update-rc.d

windependence
May 6th, 2010, 01:14 PM
Start up scripts can be placed in /etc/rc.local file
so that they are executed at boot.

-Tim

Frizianz
May 7th, 2010, 06:51 AM
Sorry For The Rushed Post. Im Looking For Something that will run on startup, and also be able to restart the server manually whilst not having to keep that ssh window open.

This Command needs to also be executed as a certain user. As its a security risk to run the server as root :)

windependence
May 7th, 2010, 07:08 AM
To start a process non-interactively, follow it with an ampersand like this:


./cod2_lnxded &

Then, you should be able to close the remote console and it will stay running. That is if it works like any other Linux command.

-Tim

Frizianz
May 7th, 2010, 07:38 AM
Thanks. What Can I Add to the Script to make it run as the user cod4_1?

mrjerryk
May 27th, 2010, 07:02 AM
I would like to know how to do this as well. I am using screen right now and it's working fine. But I would like it so I can just have it start at boot and restart if the server goes down so I can give other admins access to restart the server using rcon commands in the game without giving them ssh access to my linux box.

I know it's possible with init.d and or cron but I have no idea how to set something like that up.

The command to start my server is

screen ./codwaw_lnxded +exec server.cfg +map_rotate

Thanks in advance for any help!

paddy.melon
May 27th, 2010, 07:38 AM
Thanks. What Can I Add to the Script to make it run as the user cod4_1?

simply run it from that user, so ssh:

login
user: cod4_1
password: <ur passwd>

then execute the above command!