-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nevermore wrote:
> Hi, i am now using screen to start my server as daemon.
> But i know that professional hosters uses diferent ways.
> 
> i have reasons to think that screen is freezing my servers.
> 
> so... How do you start your server?

If you're not interested in having terminal based console access, a good
way to go on this is a simple shell script wrapper that starts the
server in the background and logs all the output to your syslogger.

Copy the following to a file, modify to suit your startup options and
chmod 755 <filename>.  Then, you can just run this script to start the
server.  The output will probably show up in /var/log/messages by
default.  If not, configure your syslogger.

#!/bin/sh

# Set vars to be used
game='left4dead'
ip='*.*.*.*'
game_opts="-game $game -ip $ip +map l4d_dem_hospital01_apartment"
base_dir='/opt/halflife/l4d_demo'
log='/usr/bin/logger'
log_opts="-p daemon.info -i -t $game"
cmd="./srcds_run $game_opts 2>&1 | $log $log_opts"

# Change to the base dir
cd $base_dir
# Run it, but start it as a background task
$cmd &

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkd4NEACgkQQ0lr+ZVKSBjrsACfetc3SNfFHpj5hyjl6OGOAshe
10AAn3Z2O+kxaFVcYbOgyM52GMQGY3hM
=/mEe
-----END PGP SIGNATURE-----

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to