summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-16 03:24:56 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-16 03:24:56 +0000
commit65206801a13ce34282a5e0a6717b5c0da5b13609 (patch)
treed0c3eb374b8d029a07a3fa457c0db44722e798cf /games-server/halflife-steam/files
parentbump (diff)
downloadgentoo-2-65206801a13ce34282a5e0a6717b5c0da5b13609.tar.gz
gentoo-2-65206801a13ce34282a5e0a6717b5c0da5b13609.tar.bz2
gentoo-2-65206801a13ce34282a5e0a6717b5c0da5b13609.zip
update instructions and add init.d script #112526 by Kai Lippok
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'games-server/halflife-steam/files')
-rw-r--r--games-server/halflife-steam/files/hlds.confd14
-rw-r--r--games-server/halflife-steam/files/hlds.rc38
2 files changed, 52 insertions, 0 deletions
diff --git a/games-server/halflife-steam/files/hlds.confd b/games-server/halflife-steam/files/hlds.confd
new file mode 100644
index 000000000000..ccea142ce1e1
--- /dev/null
+++ b/games-server/halflife-steam/files/hlds.confd
@@ -0,0 +1,14 @@
+# /etc/conf.d/hlds: config file for halflife steam server
+
+# Path to game
+HLDS_PATH="@GAMESDIR@"
+
+# Machine type: The binary you want to start
+# For Source-based games use the following values:
+# srcds_amd for Athlon and x64 systems
+# srcds_i486 for non-MMX capable machines
+# srcds_i686 on most x86 systems
+#HLDS_MT="srcds_i686"
+
+# Here you can set your start options like game type and maxplayers ...
+HLDS_OPTS="-console -port 27015 -game cstrike +map de_dust +maxplayers 6"
diff --git a/games-server/halflife-steam/files/hlds.rc b/games-server/halflife-steam/files/hlds.rc
new file mode 100644
index 000000000000..14720fe0cec1
--- /dev/null
+++ b/games-server/halflife-steam/files/hlds.rc
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-server/halflife-steam/files/hlds.rc,v 1.1 2005/11/16 03:24:56 vapier Exp $
+
+depend() {
+ use net
+}
+
+checkconfig() {
+ local var
+ for var in HLDS_PATH HLDS_MT HLDS_OPTS ; do
+ if [[ -z ${!var} ]] ; then
+ eerror "Need to set ${var} in /etc/conf.d/HLDS_PATH"
+ return 1
+ fi
+ done
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting Halflife Dedicated Server"
+ export LD_LIBRARY_PATH=${HLDS_PATH}:${HLDS_PATH}/bin:${LD_LIBRARY_PATH}
+ start-stop-daemon --start \
+ --chdir ${HLDS_PATH} -c @GAMES_USER@:@GAMES_GROUP@ \
+ -n ${HLDS_MT} -b -a ${HLDS_PATH}/${HLDS_MT} \
+ -- \
+ -pidfile /var/run/hlds.pid ${HLDS_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Halflife Dedicated Server"
+ start-stop-daemon --stop --pidfile /var/run/hlds.pid
+ eend $?
+}