1 |
# $Id: smeserver-teamspeak-server.spec,v 1.2 2018/01/19 04:28:08 jpp Exp $ |
# $Id: smeserver-teamspeak-server.spec,v 1.3 2018/03/05 13:40:10 jcrisp Exp $ |
2 |
# Authority: cool34000 |
# Authority: cool34000 |
3 |
# Name: Sylvain Gomez |
# Name: Sylvain Gomez |
4 |
|
|
5 |
%define name smeserver-teamspeak-server |
%define name smeserver-teamspeak-server |
6 |
%define version 3.1 |
%define version 3.1 |
7 |
%define release 2 |
%define release 3 |
8 |
%define rpmver 4.0.4 |
%define rpmver 4.0.4 |
9 |
|
|
10 |
|
|
33 |
|
|
34 |
|
|
35 |
%changelog |
%changelog |
36 |
|
* Mon Apr 17 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 3.1-3.sme |
37 |
|
- Modify spec to change ts2server.pid to ts3server.pid |
38 |
|
- add new init script |
39 |
|
- add new profile.d script to set LD PATH on boot |
40 |
|
|
41 |
* Mon Mar 05 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 3.1-2.sme |
* Mon Mar 05 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 3.1-2.sme |
42 |
- New init script |
- New init script |
43 |
- change default port |
- change default port |
109 |
if [ $1 = 0 ] ; then |
if [ $1 = 0 ] ; then |
110 |
DIR=/opt/teamspeak |
DIR=/opt/teamspeak |
111 |
# Stopping TS service if needed... |
# Stopping TS service if needed... |
112 |
if [ -e $DIR/tsserver2.pid ]; then |
if [ -e $DIR/tsserver3.pid ]; then |
113 |
echo -n "Stopping the TeamSpeak Voice server..." |
echo -n "Stopping the TeamSpeak Voice server..." |
114 |
if ( kill -TERM `cat $DIR/tsserver2.pid` ); then |
if ( kill -TERM `cat $DIR/tsserver3.pid` ); then |
115 |
for c in $(seq 1 300); do |
for c in $(seq 1 300); do |
116 |
if [ -e $DIR/tsserver2.pid ]; then |
if [ -e $DIR/tsserver3.pid ]; then |
117 |
echo -n "." |
echo -n "." |
118 |
sleep 1 |
sleep 1 |
119 |
fi |
fi |
121 |
fi |
fi |
122 |
if [ -e $DIR/tsserver2.pid ]; then |
if [ -e $DIR/tsserver2.pid ]; then |
123 |
echo "server does not shutdown cleanly - killing" |
echo "server does not shutdown cleanly - killing" |
124 |
kill -KILL `cat $DIR/tsserver2.pid` |
kill -KILL `cat $DIR/tsserver3.pid` |
125 |
rm $DIR/tsserver2.pid |
rm $DIR/tsserver3.pid |
126 |
sleep 5 |
sleep 5 |
127 |
else |
else |
128 |
echo "done" |
echo "done" |