summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conrad@kostecki.com>2018-06-22 11:07:07 +0200
committerMichał Górny <mgorny@gentoo.org>2018-06-22 20:39:47 +0200
commit5bc006637ea7b908a0ce13f45687f34b32466a55 (patch)
tree97e5f26d9c4e218a5ce8483a70a8684351e11e87 /games-server/steamcmd/files
parentprofiles/license_groups: add SteamCMD license to EULA group (diff)
downloadgentoo-5bc006637ea7b908a0ce13f45687f34b32466a55.tar.gz
gentoo-5bc006637ea7b908a0ce13f45687f34b32466a55.tar.bz2
gentoo-5bc006637ea7b908a0ce13f45687f34b32466a55.zip
games-server/steamcmd: New package
Closes: https://bugs.gentoo.org/652236 Closes: https://github.com/gentoo/gentoo/pull/7776 Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'games-server/steamcmd/files')
-rw-r--r--games-server/steamcmd/files/README.gentoo42
-rw-r--r--games-server/steamcmd/files/steamcmd.confd15
-rw-r--r--games-server/steamcmd/files/steamcmd.initd32
3 files changed, 89 insertions, 0 deletions
diff --git a/games-server/steamcmd/files/README.gentoo b/games-server/steamcmd/files/README.gentoo
new file mode 100644
index 000000000000..70f027bb8044
--- /dev/null
+++ b/games-server/steamcmd/files/README.gentoo
@@ -0,0 +1,42 @@
+Before you can start installing your favourite dedicated server,
+you must let SteamCMD do update itself.
+You can do this, by running SteamCMD itself:
+
+cd /opt/steamcmd
+runuser -l steamcmd -c './steamcmd.sh' -s /bin/bash
+
+On the first run, you will see, that SteamCMD starts updating itself.
+After that, SteamCMD is ready to go
+for installing your favourite dedicated server.
+
+Please keep in mind: You should not run SteamCMD as root!
+
+This package provides an init script and a conf file.
+Don't modify those files directly,
+but instead make a symlink of that init script
+and a copy of that conf file.
+You would do this for every server, you want to setup.
+
+For example, you wan't to setup an old Counter-Strike 1.6 server,
+you would do:
+
+cd /etc/init.d
+ln -s steamcmd steamcmd.cstrike
+
+cd /etc/conf.d
+cp steamcmd steamcmd.cstrike
+
+After that, make your settings in /etc/conf.d/steamcmd.cstrike
+
+In order to install with SteamCMD a dedicated server,
+for example CS 1.6, please run:
+
+cd /opt/steamcmd
+./steamcmd.sh +login anonymous +force_install_dir /opt/steamcmd/hlds +app_set_config 90 mod cstrike +app_update 90 validate +quit
+
+While you can use any path for '+force_install_dir', it's recommended to use:
+'/opt/steamcmd/hlds' for older HL1 based mods.
+'/opt/steamcmd/srcds' for newer HL2 based mods.
+
+For more information, please visit the Valve Developer Community:
+https://developer.valvesoftware.com/wiki/SteamCMD
diff --git a/games-server/steamcmd/files/steamcmd.confd b/games-server/steamcmd/files/steamcmd.confd
new file mode 100644
index 000000000000..dcaf8036b88a
--- /dev/null
+++ b/games-server/steamcmd/files/steamcmd.confd
@@ -0,0 +1,15 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Specifies, which server binary is used.
+# This could be 'hlds_run' or 'srcds_run', depending on your game.
+STEAMCMD_BINARY="hlds_run"
+
+# Path to the files of your started server.
+# It's recommended to use:
+# '/opt/steamcmd/hlds' for older HL1 based mods.
+# '/opt/steamcmd/srcds' for newer HL2 based mods.
+STEAMCMD_PATH="/opt/steamcmd/hlds"
+
+# Options for your server binary.
+STEAMCMD_OPTS="-game valve +ip 127.0.0.1 +maxplayers 32 +map crossfire -pingboost 3"
diff --git a/games-server/steamcmd/files/steamcmd.initd b/games-server/steamcmd/files/steamcmd.initd
new file mode 100644
index 000000000000..fecd30e3079b
--- /dev/null
+++ b/games-server/steamcmd/files/steamcmd.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ "${SVCNAME}" = "steamcmd" ]; then
+ instance="main"
+else
+ instance="${SVCNAME#steamcmd.}"
+fi
+
+name="SteamCMD (Mod: ${instance})"
+pidfile="/run/steamcmd.${instance}.pid"
+screen_name="steamcmd.${instance}"
+start_stop_daemon_args="--chdir ${STEAMCMD_PATH}"
+
+command="screen"
+command_args="-DmUS ${screen_name} ${STEAMCMD_PATH}/${STEAMCMD_BINARY} ${STEAMCMD_OPTS}"
+command_background="true"
+command_group="steamcmd"
+command_user="steamcmd"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ if [ -z "$STEAMCMD_BINARY" ] || [ -z "$STEAMCMD_PATH" ] || [ -z "$STEAMCMD_OPTS" ]; then
+ eerror "One or more STEAMCMD_* variables in /etc/conf.d/steamcmd.${SVCNAME} are not set!"
+ return 1
+ fi
+ return 0
+}