Jump to content

Half-Life dedicated server (minor) problems


Guest KShots
 Share

Recommended Posts

Guest KShots

Hello all, here's my current standpoint:

 

I'm trying to run a counter-strike server using the half-life dedicated server and counterstrike dedicated server(s) using the following line:

/usr/games/hlds_1/hlds_run -game cstrike +sv_lan -nomaster +maxplayers 12 +map de_shuttle_n8 -port 27015

... and it seems to run. It claims it's downloading some sort of security package, then says it's complete, then says it failed the download, and says that the server's not secure - not sure what that's about. After that, everything seems to run fine - I can connect to it, a bunch of friends outside my network connected to it (once I supplied them with the IP), and it was fun.

 

Here's my problems -

 

1. I have to run this through an SSH console because the server has no keyboard, monitor, or mouse. Once I disconnect the SSH session, the half-life server goes bye-bye. I'd like to keep it running all the time if possible. I mentioned this earlier in another topic (which I seem to have lost track of) in which someone mentioned the use of "screen" to do this. On the surface, this worked exactly as the person claimed it would... until I logged out and the HL server promptly went kaput. Is there a way to make this a service or daemon? (Not actually sure the term daemon applies because this shouldn't ever sleep)

 

2. I'm not altogether sure I have all the correct ports opened up on my firewall - I have searched the internet and got many port numbers to open up, though none seem to list the entirety of what I've gathered. I wouldn't mind a link to an official document from Sierra that I have somehow missed, though I should perhaps just e-mail them for that if need be. I'd really rather not open up more than I need to, and at the same time I'd rather not be missing out on getting myself listed on the server-list on WON for missing that port or something equally as silly.

 

3. I'm somewhat embarassed to mention it, but I seem to have failed to find just what some of the arguments I've been using means. Things like +sv_lan (What's that do?) and -nomaster (huh?). I couldn't find any docs in my HL directories or the HLDS for linux directories, nor on the sierra website. A list of such and what they mean would be really kewl :)

 

As I said, these are minor problems that if need be, I can live without (I mean, hey, it works :)), but if anyone knows anything about 1 or happens to know a link to 2 (I'm not asking anyone to dig around on that since I'll e-mail sierra about it if need be - I'm not quite that lazy :)), I'd really appreciate it.

 

Thanks guys!

Link to comment
Share on other sites

Hello all, here's my current standpoint:

 

I'm trying to run a counter-strike server using the half-life dedicated server and counterstrike dedicated server(s) using the following line:

/usr/games/hlds_1/hlds_run -game cstrike +sv_lan -nomaster +maxplayers 12 +map de_shuttle_n8 -port 27015

... and it seems to run. It claims it's downloading some sort of security package, then says it's complete, then says it failed the download, and says that the server's not secure - not sure what that's about. After that, everything seems to run fine - I can connect to it, a bunch of friends outside my network connected to it (once I supplied them with the IP), and it was fun.

 

Here's my problems -  

 

1. I have to run this through an SSH console because the server has no keyboard, monitor, or mouse. Once I disconnect the SSH session, the half-life server goes bye-bye. I'd like to keep it running all the time if possible. I mentioned this earlier in another topic (which I seem to have lost track of) in which someone mentioned the use of "screen" to do this. On the surface, this worked exactly as the person claimed it would... until I logged out and the HL server promptly went kaput. Is there a way to make this a service or daemon? (Not actually sure the term daemon applies because this shouldn't ever sleep)

 

2. I'm not altogether sure I have all the correct ports opened up on my firewall - I have searched the internet and got many port numbers to open up, though none seem to list the entirety of what I've gathered. I wouldn't mind a link to an official document from Sierra that I have somehow missed, though I should perhaps just e-mail them for that if need be. I'd really rather not open up more than I need to, and at the same time I'd rather not be missing out on getting myself listed on the server-list on WON for missing that port or something equally as silly.

 

3. I'm somewhat embarassed to mention it, but I seem to have failed to find just what some of the arguments I've been using means. Things like +sv_lan (What's that do?) and -nomaster (huh?). I couldn't find any docs in my HL directories or the HLDS for linux directories, nor on the sierra website. A list of such and what they mean would be really kewl :)

 

As I said, these are minor problems that if need be, I can live without (I mean, hey, it works :)), but if anyone knows anything about 1 or happens to know a link to 2 (I'm not asking anyone to dig around on that since I'll e-mail sierra about it if need be - I'm not quite that lazy :)), I'd really appreciate it.

 

Thanks guys!

 

Create a script on the Server which starts your CS dedicated Server, then run it in the background like this;

 

$./dedicatedcsscript &

 

Here is an example of how you can setup your script;

_______________________________________________

#!/bin/sh

cd /usr/games/hlds_1/

hlds_run -game cstrike +sv_lan -nomaster +maxplayers 12 +map de_shuttle_n8 -port 27016

_____________________________________________

 

You can save the script as what ever you want. As far as the security package, perhaps you would be better off just download the full version dedicated CS server, for Linux ? Also you have to one up your dedicated server port, if you are running a dedicated server and you plan on joining as a client yourself.

Link to comment
Share on other sites

Guest KShots
Create a script on the Server which starts your CS dedicated Server, then run it in the background like this;  

 

$./dedicatedcsscript &  

 

Here is an example of how you can setup your script;  

_______________________________________________  

#!/bin/sh  

cd /usr/games/hlds_1/  

hlds_run -game cstrike +sv_lan -nomaster +maxplayers 12 +map de_shuttle_n8 -port 27016  

_____________________________________________

I'll give that a try... I thought that background programs got terminated when you log out, tho (Don't they?) so that users don't leave a big mess of programs from not shutting down their progs.
As far as the security package, perhaps you would be better off just download the full version dedicated CS server, for Linux ?
That's what I'm using
Also you have to one up your dedicated server port, if you are running a dedicated server and you plan on joining as a client yourself.
I have no plans on having the server itself join in the game :). It's a dedicated server - it won't join its own game, I'll join from another computer (This one doesn't even have a keyboard/monitor/mouse).
Link to comment
Share on other sites

Another possibility would be to run it as a service. For example, put the following script in /etc/init.d/ and name it (let's say) HLS

#!/bin/sh

# chkconfig: 2345 90 10

# description: Half-Life dedicated server

. /etc/rc.d/init.d/functions

case "$1" in

start)

       echo -n "Starting HL server: "

       su -c "/usr/games/hlds_1/hlds_run -game cstrike +sv_lan -nomaster +maxplayers 12 +map de_shuttle_n8 -port 27015" WhateverUser

       echo
;;

stop)

       echo -n "Stoping HL server: "

       killproc -TERM /usr/games/hlds_1/hlds_run

       echo
;;

status)

       status hlds_run
;;

*)

       echo "Usage: $0 {start|stop|status}"

       exit 1

esac

exit 0

The command is according to that website:

 

http://www.experts-exchange.com/Operating_...Q_10200749.html

It, 'su -c command user'.

 

Now make it executable, owned and stuff by root by typing as root

chmod 700 /etc/init.d/HLS

chgrp root  /etc/init.d/HLS

chown root  /etc/init.d/HLS

 

Now create simlinks at the right place by typing as root

chkconfig HLS reset

 

Now I guess you could start/stop/status the server by typing as root

service HLS start



or



service HLS stop



or



service HLS status

 

:wink:

 

This is all according to this website (old docs):

http://www.mandrakeuser.org/docs/admin/aservice.html

 

I did it for no-ip so this is why I'm suggesting it.

 

I guess ARU could check the script as I'm sure he will find little things here and there that could be done better. ... note that I'm not even sure it will work this way. hahaha

 

Note that you can also create different script with different maps. Then if you want to start a server with map X, you type 'service HLS_X start' and if you want to start a server with map Y you type 'service HLS_Y start'. Just follow the above procedure for all script.

 

LAst note, you'll have to play with # chkconfig: 2345 90 10 so that it suits your need. Read http://www.mandrakeuser.org/docs/admin/aservice.html

 

MOttS

Link to comment
Share on other sites

I guess ARU could check the script as I'm sure he will find little things here and there that could be done better. ... note that I'm not even sure it will work this way. hahaha

To me the script is fine, except that the hlds_run should be run in the background, and that IMHO would be better to launch it in a new login environment (su -), so I'd put it as:

 

 su - WhateverUser -c "/usr/games/hlds_1/hlds_run -game cstrike +sv_lan -nomaster +maxplayers 12 +map de_shuttle_n8 -port 27015 &"

 

I haven't read the whole thread though

Link to comment
Share on other sites

Guest KShots

Kewl, that seems to work (after a little work :))

 

...Another thing I forgot to mention is I get this line:

ERROR1:INSERT INTO servers (ip,port,name) VALUES('',,'Half-Life')

and the exact error sequence for the security module:

Downloading Security Module from Speakeasy.net ...

Completed downloading Security Module from Speakeasy.net

Server is in Secure Mode.

ERROR1:INSERT INTO servers (ip,port,name) VALUES('',,'Half-Life')

Error downloading Security Module from Speakeasy.net

Server is not Secure.

Note: The ERROR1: seems to appear all over the place at random times, meaning it doesn't always appear between the "server is in secure mode" and the "server is not secure"

Link to comment
Share on other sites

Guest KShots

Ok, this area doesn't seem to work right...:

stop) 

       echo -n "Stoping HL server: " 

       killproc -TERM /usr/games/hlds_1/hlds_run 

       echo 
;;

I get the following response (after it's started):

[root@x1-6-00-a0-c9-b7-bd-6b rich]# service HLS stop

Stoping HL server: pidof: invalid options on command line!



pidof: invalid options on command line!



                                                               [FAILED]

[root@x1-6-00-a0-c9-b7-bd-6b rich]#

...The rest seems to work, though. I changed the start line to:

su - rich -c "/usr/games/hlds_1/hlds_run -game cstrike +sv_lan -nomaster +max

players 12 +map de_shuttle_n8 -port 27015 > /home/rich/HL_Log &"

so that all its output gets piped to a file for later browsing (If need be). Also, it likes to run from the directory of the start script (hlds_run is another script), and I added a "cd /usr/games/hlds_1" into hlds_run so it would work - as a service, it doesn't change the directory I'm in when I start it :).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...