Server Turns Off.

QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
How do i make it so the server doesnt turn off when i exit SSH Console.

Comments

  • AeaAea Join Date: 2003-10-09 Member: 21552Members
    Read the Fine(1) Manual

    screen -A -m -d -S ns ./hlds_run -game ns +ip xxx.xxx.xxx.xxx +maxplayers 12 +map ns_eclipse

    (1) Some people may use an alternative word here, if you can't guess what it is, it's best you don't know.
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    edited November 2003
    where do i enter that? i tryed using that ..
    plz tell i really need to know
  • GoPeDeRiCkGoPeDeRiCk Join Date: 2003-03-21 Member: 14742Members
    in the folder that hlds_run is located or what ever file u use
  • nthngnthng Join Date: 2003-08-22 Member: 20083Members
    hi qwerty,
    dont worry, Im gonna keep your secret from SwGC, that you dont know how to run hlds <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • LumpyLumpy Join Date: 2003-08-20 Member: 20026Members
    edited November 2003
    This may make it even easier. In the home directory of the user that I run hlds as I make a file called ns.

    touch ns

    I edit this file with a text editor to include the following

    cd /path/to/hlds_l
    screen -A -m -d -S ns ./hlds_run -game ns +log on +maxplayers 20 +map ns_bast +port 27016

    I then save it and make this ns file executable by doing the following

    chmod +x ns

    Now all you have to do is log in via ssh. You're already in your home directory so you just type ./ns
    and voila it'll do it all for you, and then you can log out.

    If you wanna check that the server's running you would run screen -r ns and then to leave screen without closing the server you would do CTRL+A, D

    These are all tips and tricks I found in the linux forums here.
  • Jim_has_SkillzJim_has_Skillz Join Date: 2003-01-19 Member: 12475Members, Constellation
    You could do that or you could add & to the end of startup command and it will work in the background. I think it doesn't work if someone joins the server before you leave the ssh console. It would look something like this.

    ./hlds_run -game ns +log on +maxplayers 20 +map ns_bast +port 27016 &

    Putting the & sign at the end of any executable will make it run in the background if the executable doesn't do it for you.
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    that & one helps <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> soo.. one more question
    how do i turn it off <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • LumpyLumpy Join Date: 2003-08-20 Member: 20026Members
    edited November 2003
    I don't use & myself due to the fact that I don't know how. So I did some research. I'll tell you what I know, or think I know.

    A fg will bring a background application to the foreground and then a CTRL+C will kill the process.

    I did notice however that if I ran the app in the background, logged out, logged back in. It would still be running. However a fg would not show the application, so I had no way to bring it to the foreground to kill it. I tried a killall hlds but it just restarted the server. I ended up having to slay myself and all my processes.

    Hope this helps.
  • AeaAea Join Date: 2003-10-09 Member: 21552Members
    ps -ef

    kill <ps id>

    ALWAYS works for me <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
  • verboseverbose Join Date: 2002-11-25 Member: 9968Members, Constellation
    <!--QuoteBegin--Lumpy+Nov 4 2003, 08:11 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Lumpy @ Nov 4 2003, 08:11 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I did notice however that if I ran the app in the background, logged out, logged back in. It would still be running. However a fg would not show the application <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Hence one of the common uses of screen: the ability to re-attach to the stdin/stdout/stderr of a backgrounded process, across logins and logouts.
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    edited November 2003
    Thanks again
    Oh and One Little question :-)
    can ya point me to a linux command list

    and uhh.. where can i find an hlds booster
    like the one hullu made WINHL-Booster
    except for linux?
  • LumpyLumpy Join Date: 2003-08-20 Member: 20026Members
    Not too sure about a linux command list.

    HLDS includes its own ping booster option. Just add -pingboost 1 or 2 or 3 in your command line.

    I'm not sure what the different options do actually. Most people just recommend playing around with it to find out.

    Alternatively UDPsoft the makers of All Seeing Eye make a ping booster too.

    <a href='http://www.udpsoft.com/booster/' target='_blank'>http://www.udpsoft.com/booster/</a>
  • GoPeDeRiCkGoPeDeRiCk Join Date: 2003-03-21 Member: 14742Members
    ping booster is for idiots, why would you want to increase ur cpu ussage and bandwidth usage?
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    edited November 2003
    doesnt hurt to be curious goper
    Now that cpanel is installed & for some reason doesnt work..
    and how do i screen? whenever i try to screen it says
    screen: command not found
  • LumpyLumpy Join Date: 2003-08-20 Member: 20026Members
    Sounds like screen isn't installed on your system.

    Is this some sort of game server you're running? If so maybe they can install screen for you or something.

    If its your own server then list what distro of linux you're using and maybe someone can guide you on how to install screen.
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    Well Im using Redhat 9.0
    Sooo IF someone can
    Guide me to installing screen ^_^
  • LumpyLumpy Join Date: 2003-08-20 Member: 20026Members
    edited November 2003
    I don't know how much help I can be. I'm a FreeBSD man myself.

    Screen's a pretty popular program. It's website is <a href='http://www.gnu.org/software/screen/' target='_blank'>http://www.gnu.org/software/screen/</a>

    However almost every distro of linux comes with screen already so you don't have to download it etc.

    In the case of Redhat it should be some sort of RPM I believe. Probably on one of your CDs.

    I want to say Redhat has some RPM manager, or something like that which lets you browse the different RPMs and lets you choose which ones to install etc.

    Edit: I did some research and found that redhat include a program called rpm which you run to install a rpm.

    You can find out more at <a href='http://www.redhat.com/support/resources/faqs/rhl_general_faq/s1-install.html' target='_blank'>http://www.redhat.com/support/resources/fa...s1-install.html</a>

    More specifically under the Installing RPM Packages section

    I would browse/search your cds for some sort of screen*.rpm file. Once you find it, just mount the cd and use the rpm command to install the package.

    I google searched screen +rpm and found some places to download it if you need to. I'd be more trusting of something you found on the redhat cds though. Mostly due to my ignorance of how rpms work and if you have to get a special one or whatever.
  • VadakillVadakill The Almighty BSO Join Date: 2002-04-02 Member: 373Members, NS1 Playtester
    Do the following at the command line:

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    wget ftp://216.254.0.38/linux/redhat/9/en/os/i386/RedHat/RPMS/screen-3.9.13-5.i386.rpm
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Once it is downloaded, do:

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    rpm -Uvh screen-3.9.13-5.i386.rpm
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Then remove the rpm file, since you don't need it anymore:

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    rm screen-3.9.13-5.i386.rpm
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Screen should now be installed properly.
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    edited November 2003
    WOOT TY *Remembers to mess around with screen when server empty -_-
    how do you turn off a screened server <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
  • GoPeDeRiCkGoPeDeRiCk Join Date: 2003-03-21 Member: 14742Members
    screen -r

    find the prosses number then type

    kill 12345



    oooooor

    you can just type rcon quit <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    oh.. was just wondering if there was a special way to exit it <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
  • LumpyLumpy Join Date: 2003-08-20 Member: 20026Members
    edited November 2003
    The minimum way to run screen is screen -S naturalselection

    which runs screen, tells it to create a new screen/session called natural selection.

    You can create multiple screens giving each its own name.

    you can issue screen -list to get a list of the screens you have.

    To restore a screen you can do screen -r screen/session name

    That'll get you back to your console in the case of a HL/NS server. You can can issue a CTRL+C which will just kill the process and then a CTRL+D will log out of that screen session leaving you at your original prompt.

    using screen -A -m -d -S naturalselection to start the session is nicer and easier though. It automatically detaches the screen session after starting it.

    Also once you screen -r naturalselection and do a CTRL+C it'll automatically log you out of the screen session too.
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> how do i host 2 servers on ns One running a bunch of plugins and other completely normal :O
  • LumpyLumpy Join Date: 2003-08-20 Member: 20026Members
    Install NS twice. Such as a ns and a ns2 folder inside your hlds_l folder. Have one include all your plugins, have the other be as barebones as you want it to be.
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    i did it that way first but that doesnt work
    it runs ns sure but half life thinks its some new mod.
    So i did it another way ;P
    Hey.. since i dont wanna create a new topic how exactly do you make
    an ftp? i want to make an ftp to like maps folder in ns
  • BigBullBigBull Join Date: 2003-04-02 Member: 15123Members
    *bump* qwerty is helping setup servers with NSA
  • QwertyQwerty Join Date: 2003-06-30 Member: 17817Members
    Soo anyone mind helping me on as to how to setup a linux FTP server? :-| to ns/ folder
  • ObsidianAthemeObsidianAtheme Join Date: 2003-01-16 Member: 12360Members
    If you want a list of linux commands, try the listing of all the files in /bin, /sbin, /usr/bin, and /usr/sbin for starters.

    Want to know what a command does?

    man command

    'man' for MANUAL, not referring to a male. Yes, some ignorant female called Linux a sexist operating system because it has a 'man' command and not a 'woman' command. Unbelievable...

    Anyways, if you are really desperate, try 'apropos'.

    While you are at it, please read one of the many fine Linux tutorials out there. Learn how to use the command shell. If you can't figure out the basics on your own, you should probably run a Windows server instead until you CAN figure them out. It's easy to screw something up in Linux and not have any idea as to what you just did or how to fix it if you are not familiar with Linux. It is NOT computer-illiterate or moron friendly - it takes effort to learn.

    Good luck!

    By the way, try not to run an FTP server unless you REALLY need to. Use SFTP over sshd instead - it encrypts everything so you don't have to worry about sniffers running around anywhere. If you don't have access to SFTP, then try SCP - it's a pain in the rear but it does work.
Sign In or Register to comment.