[media-sound/teamspeak-server-bin] hide another file behind mysql useflag, add untested tsdns unit file for systemd, fix ebegin

This commit is contained in:
Robert Förster 2014-03-18 10:14:18 +01:00
parent f547da4f92
commit f507b0955e
4 changed files with 26 additions and 6 deletions

View File

@ -0,0 +1,19 @@
[Unit]
Description=TeamSpeak 3 TSDNS Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/teamspeak3-server
ExecStart=/opt/teamspeak3-server/sbin/tsdnsserver
ExecStop=/bin/kill -15 $MAINPID
StandardOutput=syslog
StandardError=syslog
User=teamspeak3
Group=teamspeak3
Restart=always
[Install]
WantedBy=multi-user.target
# vim:syntax=dosini

View File

@ -1,7 +1,7 @@
#!/sbin/runscript #!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation # Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.2.rc,v 1.1 2013/05/22 11:22:59 tomwij Exp $ # $Header: $
depend() { depend() {
need net need net
@ -31,7 +31,7 @@ start() {
} }
stop() { stop() {
ebegin "Stopping TeamSpeak Server" ebegin "Stopping TeamSpeak 3 Server"
start-stop-daemon --stop --quiet \ start-stop-daemon --stop --quiet \
--pidfile "/var/run/teamspeak3-server/server.pid" --pidfile "/var/run/teamspeak3-server/server.pid"

View File

@ -1,7 +1,7 @@
#!/sbin/runscript #!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation # Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.1.rc,v 1.1 2013/04/25 18:11:05 tomwij Exp $ # $Header: $
depend() { depend() {
need net need net

View File

@ -74,13 +74,14 @@ src_install() {
# Install the runtime FS layout. # Install the runtime FS layout.
insinto /etc/teamspeak3-server insinto /etc/teamspeak3-server
doins "${FILESDIR}"/server.conf doins "${FILESDIR}"/server.conf
doins "${FILESDIR}"/ts3db_mysql.ini use mysql && doins "${FILESDIR}"/ts3db_mysql.ini
keepdir /{etc,var/{lib,log,run}}/teamspeak3-server keepdir /{etc,var/{lib,log,run}}/teamspeak3-server
# Install the init script and systemd unit. # Install the init script and systemd unit.
newinitd "${FILESDIR}"/${PN}.rc teamspeak3-server newinitd "${FILESDIR}"/${PN}.rc teamspeak3-server
use tsdns && newinitd "${FILESDIR}/teamspeak-tsdns-server.rc" teamspeak3-tsdns-server use tsdns && newinitd "${FILESDIR}/teamspeak-tsdns-server.rc" teamspeak3-tsdns-server
systemd_dounit "${FILESDIR}"/systemd/teamspeak3.service systemd_dounit "${FILESDIR}"/systemd/teamspeak3.service
use tsdns && systemd_dounit "${FILESDIR}"/systemd/teamspeak3-tsdns-server.service
systemd_dotmpfilesd "${FILESDIR}"/systemd/teamspeak3.conf systemd_dotmpfilesd "${FILESDIR}"/systemd/teamspeak3.conf
# Fix up permissions. # Fix up permissions.