LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-26-2002, 05:16 PM   #1
ub3x
LQ Newbie
 
Registered: Dec 2002
Location: michigan
Distribution: redhat 8.0
Posts: 3

Rep: Reputation: 0
HELP: Half-life Dedicated server


Hi, I'm fairly new to linux. I am currently doing all my work via ssh because the server is very far away from where I am. The serer is running Redhat Linux version 8.0

I recently downloaded and installed hlds for linux (hlds_l_3110_full.bin). Along with that I installed adminmod and metamod, to enhance server performance and functionality.

Basically, what I want to do is make it so that whenever The server boots, the game will start with the map "turkeyburgers", with sv_maxspeed set at 9999 and sv_gravity set at 500. The way I usually turn the server on is going to the /hlds_l/ directory and typing

./sv_serv

and typing the following to setup the variables that make up the server

map turkeyburgers
sv_maxspeed 9999999
sv_gravity 500
sv_password password (for private games)
hostname Ub3rServ

I am looking for a way so that when the server boots the half-life server sets up and runs those commands. As opposed to my current setup where I have to login via ssh, run those commands, and stay logged into the shell for the game to be open.

If Anybody can help me out, it would be appreciated. Thanks in advanced.
 
Old 12-27-2002, 01:55 PM   #2
ub3x
LQ Newbie
 
Registered: Dec 2002
Location: michigan
Distribution: redhat 8.0
Posts: 3

Original Poster
Rep: Reputation: 0
anybody?
 
Old 12-28-2002, 06:23 PM   #3
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Have a look in the /etc/rc.d/init.d directory.

These are the files that control what gets turned on/off in a SysV format.
You can place your commands in the start section ...

or place them at the end of /etc/rc.d/rc.local file
Here, you must use the full directory for the command eg /usr/bin/sv_serv
 
Old 12-29-2002, 02:51 AM   #4
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
you could change those lines in your server.cfg located in .../hlds_l/cstrike/ (where ..... is the rest of the path information) hostname, gravity, maxspeed.. basically any sv_ and mp_ cvars can be set in that file and when you run the server via the /hlds_run command, it will read the server.cfg file and set those values it finds in there, i think (not 100% sure) it re-reads it on every map change but i dont remember.

Last edited by Robert0380; 12-29-2002 at 02:52 AM.
 
Old 12-29-2002, 03:00 AM   #5
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
i just read that you dont have physical access to the machine, if you have the IP of the machine then you should start the server using /hlds_run -game cstrike +ip <ipaddress> +port <port> +maxplayers <a number here> +map <mapname>

example

./hlds_run -game cstrike +ip 192.168.1.100 +port 27015 +maxplayers 12 +map fy_iceworld

there are other options you can pass but i think that's what i use, i sometimes forget....but that command will automatically read what's in server.cfg and set up the values you want. another useful thing is to use the screen command, i cant really explain "screen", you'd do better doing "man screen" at the pompt to see what it does, the best i can tell you is that it helps you manage windows.
 
Old 12-29-2002, 01:24 PM   #6
ub3x
LQ Newbie
 
Registered: Dec 2002
Location: michigan
Distribution: redhat 8.0
Posts: 3

Original Poster
Rep: Reputation: 0
nevermind, i'm not using hlds anymore. thanks though.
 
Old 01-17-2003, 01:50 AM   #7
Null_Bit
LQ Newbie
 
Registered: Jan 2003
Location: Denmark, Europe
Posts: 2

Rep: Reputation: 0
Quote:
Originally posted by Robert0380
i just read that you dont have physical access to the machine, if you have the IP of the machine then you should start the server using /hlds_run -game cstrike +ip <ipaddress> +port <port> +maxplayers <a number here> +map <mapname>

example

./hlds_run -game cstrike +ip 192.168.1.100 +port 27015 +maxplayers 12 +map fy_iceworld

there are other options you can pass but i think that's what i use, i sometimes forget....but that command will automatically read what's in server.cfg and set up the values you want. another useful thing is to use the screen command, i cant really explain "screen", you'd do better doing "man screen" at the pompt to see what it does, the best i can tell you is that it helps you manage windows.
I have the same problem, as newbie in Linux. I would like the halflife server to automatic startup, just after the boot.

Say I would like to execute these two commands when SME 5.6 Linux starts:

cd /halflife/
./hlds_run -game cstrike +ip 192.168.1.100 +port 27015 +maxplayers 12 +map fy_iceworld

How do i do that?
 
Old 01-24-2003, 04:57 AM   #8
Null_Bit
LQ Newbie
 
Registered: Jan 2003
Location: Denmark, Europe
Posts: 2

Rep: Reputation: 0
Quote:
Originally posted by Null_Bit
I have the same problem, as newbie in Linux. I would like the halflife server to automatic startup, just after the boot.

Say I would like to execute these two commands when SME 5.6 Linux starts:

cd /halflife/
./hlds_run -game cstrike +ip 192.168.1.100 +port 27015 +maxplayers 12 +map fy_iceworld

How do i do that?
Anybody?

/Null_Bit
 
  


Reply


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
Half-life dedicated server ip issues FonduHell Linux - Games 0 11-20-2003 08:19 PM
Installing a Half Life Dedicated Server Bill Hope Linux - Newbie 12 09-24-2003 10:50 PM
need help with half life dedicated server chiatello Linux - Networking 1 07-31-2003 11:22 PM
Trying to run a half-life dedicated server Trd79 Linux - Software 0 01-08-2003 07:37 AM
Half-Life Dedicated Server on Linux jeucken Linux - Networking 10 07-31-2002 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:46 AM.

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