diff options
author | Conrad Kostecki <conrad@kostecki.com> | 2018-06-24 16:57:01 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-06-24 17:08:20 +0200 |
commit | 1f507b53652a60eff34f32115173d75402c36504 (patch) | |
tree | c9ff4db4e8abba6ed89b5ca45c222ccf17a5560f /media-sound/teamspeak-server/files | |
parent | media-sound/teamspeak-client-bin: renamed by dropping -bin suffix (diff) | |
download | gentoo-1f507b53652a60eff34f32115173d75402c36504.tar.gz gentoo-1f507b53652a60eff34f32115173d75402c36504.tar.bz2 gentoo-1f507b53652a60eff34f32115173d75402c36504.zip |
media-sound/teamspeak-server-bin: renamed by dropping -bin suffix
Closes: https://github.com/gentoo/gentoo/pull/8436
Diffstat (limited to 'media-sound/teamspeak-server/files')
7 files changed, 128 insertions, 0 deletions
diff --git a/media-sound/teamspeak-server/files/teamspeak.initd b/media-sound/teamspeak-server/files/teamspeak.initd new file mode 100644 index 000000000000..cc8393b58db7 --- /dev/null +++ b/media-sound/teamspeak-server/files/teamspeak.initd @@ -0,0 +1,45 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/opt/bin/ts3server" +command_background="true" +group="teamspeak" +inifile="/etc/teamspeak3-server/ts3server.ini" +name="TeamSpeak Server" +pidfile="/run/teamspeak3-server/server.pid" +user="teamspeak" + +depend() { + need net + use mysql +} + +start_pre() { + # ensure, that the TS3-server finds all custom supplied shared objects on startup. + LD_LIBRARY_PATH="/opt/teamspeak3-server:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH + + # temporay fix for EPERM bug (we still leave it here to make sure it is *really* not there) + rm -f /dev/shm/7gbhujb54g8z9hu43jre8 + + checkpath -d --owner ${user}:${group} --mode 0700 /run/teamspeak3-server +} + +start() { + ebegin "Starting ${name}" + + start-stop-daemon --start --quiet --background --env "TS3SERVER_LICENSE=accept" \ + --pidfile "${pidfile}" --make-pidfile \ + --user "${user}" --group "${group}" --chdir "/opt/teamspeak3-server" \ + --exec "${command}" -- \ + inifile="${inifile}" + + eend $? +} + +restart() { + stop + sleep 3 + start +} diff --git a/media-sound/teamspeak-server/files/teamspeak.service b/media-sound/teamspeak-server/files/teamspeak.service new file mode 100644 index 000000000000..0c77e4cbe756 --- /dev/null +++ b/media-sound/teamspeak-server/files/teamspeak.service @@ -0,0 +1,16 @@ +[Unit] +Description=TeamSpeak3 Server +After=network-online.target + +[Service] +Type=simple +User=teamspeak +Group=teamspeak +WorkingDirectory=/opt/teamspeak3-server +Environment="LD_LIBRARY_PATH=/opt/teamspeak3-server" +Environment="TS3SERVER_LICENSE=accept" +ExecStartPre=/bin/rm -f /dev/shm/7gbhujb54g8z9hu43jre8 +ExecStart=/opt/bin/ts3server inifile=/etc/teamspeak3-server/ts3server.ini + +[Install] +WantedBy=multi-user.target diff --git a/media-sound/teamspeak-server/files/teamspeak.tmpfiles b/media-sound/teamspeak-server/files/teamspeak.tmpfiles new file mode 100644 index 000000000000..1b1d7f0e9902 --- /dev/null +++ b/media-sound/teamspeak-server/files/teamspeak.tmpfiles @@ -0,0 +1,4 @@ +# systemd tmpfile settings for teamspeak3-server +# See tmpfiles.d(5) for details + +d /var/run/teamspeak3 0755 teamspeak teamspeak - diff --git a/media-sound/teamspeak-server/files/ts3db_mariadb.ini.sample b/media-sound/teamspeak-server/files/ts3db_mariadb.ini.sample new file mode 100644 index 000000000000..0a8ebc47df1f --- /dev/null +++ b/media-sound/teamspeak-server/files/ts3db_mariadb.ini.sample @@ -0,0 +1,7 @@ +[config] +host=localhost +port=3306 +username=teamspeak +password=teamspeak +database=teamspeak +socket= diff --git a/media-sound/teamspeak-server/files/ts3server-bin b/media-sound/teamspeak-server/files/ts3server-bin new file mode 100644 index 000000000000..3deb9dd87e5f --- /dev/null +++ b/media-sound/teamspeak-server/files/ts3server-bin @@ -0,0 +1,10 @@ +#!/bin/bash + +# Sets BASEDIR for teamspeak3-server +BASEDIR="/opt/teamspeak3-server" + +# Work around DT_RPATH (.) security issue by chdir'ing into expected $LD_LIBRARY_PATH +export LD_LIBRARY_PATH="${BASEDIR}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}" + +# Launch teamspeak3-server +cd "${BASEDIR}" && exec "${BASEDIR}/ts3server" $* diff --git a/media-sound/teamspeak-server/files/ts3server.ini b/media-sound/teamspeak-server/files/ts3server.ini new file mode 100644 index 000000000000..962c8b80f0ad --- /dev/null +++ b/media-sound/teamspeak-server/files/ts3server.ini @@ -0,0 +1,23 @@ +machine_id= +default_voice_port=9987 +voice_ip= +licensepath=/opt/teamspeak3-server/ +filetransfer_port=30033 +filetransfer_ip= +query_port=10011 +query_ip=0.0.0.0, :: +query_ip_whitelist=query_ip_whitelist.txt +query_ip_blacklist=query_ip_blacklist.txt +dbplugin=ts3db_sqlite3 +dbpluginparameter= +dbsqlpath=/opt/teamspeak3-server/sql/ +dbsqlcreatepath=create_sqlite/ +dbconnections=10 +logpath=/var/log/teamspeak3-server/ +logquerycommands=0 +dbclientkeepdays=30 +logappend=0 +query_skipbruteforcecheck=0 +query_buffer_mb=20 +http_proxy= +license_accepted=1 diff --git a/media-sound/teamspeak-server/files/ts3server_mariadb.ini.sample b/media-sound/teamspeak-server/files/ts3server_mariadb.ini.sample new file mode 100644 index 000000000000..94cea8bbe9d8 --- /dev/null +++ b/media-sound/teamspeak-server/files/ts3server_mariadb.ini.sample @@ -0,0 +1,23 @@ +machine_id= +default_voice_port=9987 +voice_ip= +licensepath=/opt/teamspeak3-server/ +filetransfer_port=30033 +filetransfer_ip= +query_port=10011 +query_ip=0.0.0.0, :: +query_ip_whitelist=query_ip_whitelist.txt +query_ip_blacklist=query_ip_blacklist.txt +dbplugin=ts3db_mariadb +dbpluginparameter=ts3db_mariadb.ini +dbsqlpath=/opt/teamspeak3-server/sql/ +dbsqlcreatepath=create_mariadb/ +dbconnections=10 +logpath=/var/log/teamspeak3-server/ +logquerycommands=0 +dbclientkeepdays=30 +logappend=0 +query_skipbruteforcecheck=0 +query_buffer_mb=20 +http_proxy= +license_accepted=1 |