[media-sound/teamspeak-server-bin] sync with tree

This commit is contained in:
Robert Förster 2015-08-21 14:55:40 +02:00
parent 254cdb1d7b
commit 962c335888
2 changed files with 29 additions and 30 deletions

View File

@ -1,16 +1,19 @@
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# $Id$
name="TeamSpeak Server"
command="/usr/sbin/ts3server"
pidfile="/run/teamspeak3-server/server.pid"
command_background="true"
depend() {
need net
use mysql
}
start() {
ebegin "Starting TeamSpeak 3 Server"
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
@ -18,11 +21,14 @@ start() {
# temporay fix for EPERM bug (we still leave it here to make sure it is *really* not there)
rm -f /dev/shm/7gbhujb54g8z9hu43jre8
[ -d /var/run/teamspeak3-server ] || mkdir /var/run/teamspeak3-server
chown teamspeak3:teamspeak3 /var/run/teamspeak3-server
checkpath -d --owner teamspeak3:teamspeak3 --mode 0700 /run/teamspeak3-server
}
start() {
ebegin "Starting ${name}"
start-stop-daemon --start --quiet --background \
--pidfile "/var/run/teamspeak3-server/server.pid" --make-pidfile \
--pidfile "/run/teamspeak3-server/server.pid" --make-pidfile \
--user "teamspeak3" --chdir "/opt/teamspeak3-server" \
--exec "/usr/sbin/ts3server" -- \
inifile="/etc/teamspeak3-server/server.conf"
@ -30,17 +36,8 @@ start() {
eend $?
}
stop() {
ebegin "Stopping TeamSpeak 3 Server"
start-stop-daemon --stop --quiet \
--pidfile "/var/run/teamspeak3-server/server.pid"
eend $?
}
restart() {
svc_stop
stop
sleep 3
svc_start
start
}

View File

@ -1,8 +1,8 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# $Id$
EAPI="5"
EAPI=5
inherit eutils multilib systemd user versionator
@ -31,6 +31,8 @@ RESTRICT="installsources fetch mirror strip"
S="${WORKDIR}/teamspeak3-server_linux-${ARCH}"
QA_PREBUILT="/opt/*"
pkg_nofetch() {
elog "Please download ${A}"
elog "from ${HOMEPAGE}?page=downloads and place this"
@ -50,7 +52,7 @@ src_install() {
into ${opt_dir}
insinto ${opt_dir}
exeinto ${opt_dir}
newsbin ts3server_linux_${ARCH} ts3server-bin
newsbin ts3server_linux_${ARCH} ts3server-bin
doexe *.sh
doins *.so
# 'libmariadb.so.2' is hard-coded into the ts3-server binary :(
@ -59,8 +61,9 @@ src_install() {
# Install documentation and tsdns.
dodoc -r CHANGELOG doc/*.txt
use doc && dodoc -r serverquerydocs
use pdf && dodoc doc/*.pdf
use doc && dodoc -r serverquerydocs doc/*.pdf && \
docompress -x /usr/share/doc/${PF}/serverquerydocs && \
dosym ../../usr/share/doc/${PF}/serverquerydocs ${opt_dir}/serverquerydocs
if use tsdns; then
newsbin tsdns/tsdnsserver_linux_${ARCH} tsdnsserver
@ -72,19 +75,18 @@ src_install() {
# Install the runtime FS layout.
insinto /etc/teamspeak3-server
doins "${FILESDIR}"/server.conf
use mysql && doins "${FILESDIR}"/ts3db_mariadb.ini
keepdir /{etc,var/{lib,log,run}}/teamspeak3-server
doins "${FILESDIR}"/server.conf "${FILESDIR}"/ts3db_mariadb.ini
keepdir /{etc,var/{lib,log}}/teamspeak3-server
# Install the init script and systemd unit.
newinitd "${FILESDIR}"/${PN}.rc teamspeak3-server
newinitd "${FILESDIR}"/${PN}-init-r1 teamspeak3-server
systemd_dounit "${FILESDIR}"/systemd/teamspeak3.service
systemd_dotmpfilesd "${FILESDIR}"/systemd/teamspeak3.conf
# Fix up permissions.
fowners teamspeak3 /{etc,var/{lib,log,run}}/teamspeak3-server
fowners teamspeak3 /{etc,var/{lib,log}}/teamspeak3-server
fowners teamspeak3 ${opt_dir}
fperms 700 /{etc,var/{lib,log,run}}/teamspeak3-server
fperms 700 /{etc,var/{lib,log}}/teamspeak3-server
fperms 755 ${opt_dir}
}