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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-26-2002, 05:16 PM
|
#1
|
LQ Newbie
Registered: Dec 2002
Location: michigan
Distribution: redhat 8.0
Posts: 3
Rep:
|
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.
|
|
|
12-27-2002, 01:55 PM
|
#2
|
LQ Newbie
Registered: Dec 2002
Location: michigan
Distribution: redhat 8.0
Posts: 3
Original Poster
Rep:
|
anybody?
|
|
|
12-28-2002, 06:23 PM
|
#3
|
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458
Rep:
|
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
|
|
|
12-29-2002, 02:51 AM
|
#4
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
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.
|
|
|
12-29-2002, 03:00 AM
|
#5
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
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.
|
|
|
12-29-2002, 01:24 PM
|
#6
|
LQ Newbie
Registered: Dec 2002
Location: michigan
Distribution: redhat 8.0
Posts: 3
Original Poster
Rep:
|
nevermind, i'm not using hlds anymore. thanks though.
|
|
|
01-17-2003, 01:50 AM
|
#7
|
LQ Newbie
Registered: Jan 2003
Location: Denmark, Europe
Posts: 2
Rep:
|
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?
|
|
|
01-24-2003, 04:57 AM
|
#8
|
LQ Newbie
Registered: Jan 2003
Location: Denmark, Europe
Posts: 2
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 08:46 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|