SRCDS Steam group


Linux Distribution (i know this has been asked a million times)
#1
What is the best command line linux with no login for srcds? I want to have my system reboot with crone.daily and i dont want to have to enter my username and password. Is this possible with any distribution?
Reply
#2
create startup and have it like this:
Code:
!/bin/sh
MAIL=me
dir="srcds"
srcdsbin="srcds_run"
srcdsname="srcds.pid"
options="-console -game cstrike +map de_dust2  +ip xx.xx.xx.xx +maxplayers 32 -tickrate$
cd $dir
if test -r $srcdsname; then
  # there is a pid file -- is it current?
  srcdspid=`cat $srcdsname`
  if `kill -CHLD $srcdspid >/dev/null 2>&1`; then
    # it's still going
    # back out quietly
    exit 0
  fi
  echo "Source Dedicated Server Crontab notice:"
  echo ""
  echo "Stale $srcdsname file (erasing it)"
  rm -f $srcdsname
fi
echo ""
echo "Couldn't find the srcds running.  Reloading it..."
echo ""
./$srcdsbin $options >/dev/null 2>&1
then run chmod +x startup

keep the script in your homedir and run crontab -e and put this in there

Code:
0,10,20,30,40,50 * * * *   /home/mydir/startup >/dev/null 2>&1
edit everything you need, mainly the options and the directory of your homedir(normally /home/username) and the MAIL= you can set this to your email address and it should email you everytime it starts up if you remove the >/dev/null 2> &1 part that is.

This will check and execute(if needed) every 10 minutes to make sure srcds is running.
You could use this to run on startup as well, HOWEVER, i think it'll run the server as root which IMO is bad. Why would you want to reboot a linux server anyways? other than the normal reboot for a kernel recompile or upgrade.
[Image: userbar_wow.jpg]
starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
Reply
#3
i use this one:

#!/bin/bash

hl1="/home/get/hlds"
dod_1=`ps uxw | grep dod31 | grep -v grep | awk '{print $11}'`

##############################

if [ -z "$dod_1" ]; then

echo "Couldn't find server running, restarting it."
cd "$hl1"
screen -S dod31 -d -m ./hlds_run -game dod_31 -port 27040 +ip XXXXXXXXXXXX +maxplayers XX +map dod_anzio
echo "Server Started"

fi
Linux IsiX 64 Generic Desktop ValHalla 2.6.33.4 x86_64
Intel Core 2 Duo T8400 4Gb Ram 40G SSD Intel
[Image: b_460x42_C000000-454234-696149-FFFFFF-FFF468-FFF468.png]
DoD 31 Comunity DoD 31 Spanish Comunity
Erste SS Panzer Grendier Division [DOD Clan]
Reply
#4
Well i want to run a garry's mod server and from what i hear it is very buggy and a once a day restart kind of just clears out all the "gunk"

Im a noob to linux so you will have to help me with quite a bit. Right now im intalling slackware, i chose the second pack and my partitions are 5gb swap 5gb / and 50gb /home


Reply
#5
Hmm, 5GB swap is a waste. if you have 2GB of ram, you only need 1-2GB os swap, if you have 4GB of ram you probably don't need swap. swap is your virtual memory, you can live without it, if you have neough ram, you won't page on to the hard drive.
[Image: userbar_wow.jpg]
starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
Reply
#6
well i got 60gb hard drive and its only going to be used for a single game server i figured what the hell. Anyway i gota problem now slackware i guess dident detect my ethernet or wireless... i cant ping my roughter. How do i fix, i guess i need drivers...

BTW this is a laptop

Maby i should just change distro's, might be easyer...
Reply
#7
No, linux doesn't just "detect" things, you need to enable the driver in ther kernel. lspci is your friend.

Gentoo > slackware by the way.
[Image: userbar_wow.jpg]
starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
Reply
#8
i love my slack Wink
different ways to do the same, one manually the other merged...

as cryo says

2 gb ram are surely enought

/home
/
/swap < 1g as spare

remeber to recompile a 2.6.x kernel slack cames with 2.4 kernel by default.
Linux IsiX 64 Generic Desktop ValHalla 2.6.33.4 x86_64
Intel Core 2 Duo T8400 4Gb Ram 40G SSD Intel
[Image: b_460x42_C000000-454234-696149-FFFFFF-FFF468-FFF468.png]
DoD 31 Comunity DoD 31 Spanish Comunity
Erste SS Panzer Grendier Division [DOD Clan]
Reply
#9
new problem: i want to change the lilo timeout to 2 seconds... i use this command:
jmacs /etc/lilo.conf
and it opens the file, its read only so i turn read only off. Then when i try to edit it at the bottom of the screen t says:
Could not create lock. (S)teal, (I)gnore, (Q)uit?

and i have no clue how to get the internet working... btw both wireless and ethernet shows up under lspci

edit: neverind i got timeout set to 2 but when i startup it still says 2minuts??????
Reply
#10
WOOT I GOT IT WORKING!!!! I just need to fix the startup timeout, make the autostart and keepalive sh file, and the crone restart file. Iv been working all day on this and i want to thank you guys for the help.
WOOT it works, no gui baby!
Reply
#11
Ok, i'll take back what i said, it does indeed detect it, but it doesn't automatically bring it up unless you have EVERY ethernet module compiled and have a start up script when you first install the distro, but thats not the case. Like i said ak, you find out what you have in lspci, then you add it into your kernel through devices.
This is a howto for gentoo users, but the basics are the same
http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually

It'll explain how to install what devices you need, i recommend compiling the ethernet card as a module. in fact if you're using it as a service, i recommend a majority of your devices be modules except for things like your filesystem and those that MUST be built in, the smaller your kernel is, the less memory it'll take to hold. and the smaller it is, more faster it'll be as well.

Another thing you can do to increase performance (that i do NOT recommend you do unless you really know what you are doing) is compiling the kernel with extra optimizing CFLAGS such as -O2(thats minusoh2) -funroll-loops -fomit-framepointers and a few others that you can find through google. (some people might go against -funroll-loops but i've never had a problem, though that doesn't mean you won't)

Finally, Don't forget to set the kernel frequency to 1000HZ
[Image: userbar_wow.jpg]
starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
Reply
#12
how might i do that? i loked on google for like instructions. link?
Reply
#13
I posted a link about manually compiling a kernel
[Image: userbar_wow.jpg]
starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
Reply
#14
omg im idiot
Reply
#15
dont forget to edit /etc/lilo.conf with new kernel
and run as root: /sbin/lilo
to write new lilo conf and make it efective.
Linux IsiX 64 Generic Desktop ValHalla 2.6.33.4 x86_64
Intel Core 2 Duo T8400 4Gb Ram 40G SSD Intel
[Image: b_460x42_C000000-454234-696149-FFFFFF-FFF468-FFF468.png]
DoD 31 Comunity DoD 31 Spanish Comunity
Erste SS Panzer Grendier Division [DOD Clan]
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)