Pour plus de facilité, j'ai créé un rpm de TeamSpeak Server que vous pouvez télécharger ici
Le rpm est basé sur ce topic.
J'attends vos commentaires !
Sylvain
Modérateur: modos Ixus
config setprop teamspeak status disabled
signal-event remoteaccess-update
Cool34000 a écrit:Déja je ne sais pas si c'est le bon endroit, mais une ibay n'est surement pas l'endroit approprié : il faut activer l'accès SSH pour l'utilisateur teamspeak !
service teamspeak {start | stop | restart | status | passwords }
config show teamspeak
Cool34000 a écrit:Re !
Non, les commandes et le paramétrage disponible ne sont pas dans le Wiki... Je mettrai ca à jour à moins que tu ne le fasses avant moi
my status = "db configuration getprop masq status" // Attention, je ne suis pas sur que cela soit la bonne commande
if(status!="disabled") {
$OUT="/sbin/iptables --append INPUT -p udp --dport 8767 -i \$OUTERIF -j ACCEPT";
}
bash-3.00$ config show teamspeak
bash: /sbin/e-smith/config: Permission denied
config setprop teamspeak status disabled
signal-event remoteaccess-update
service teamspeak stop
service teamspeak start
# su teamspeak -c "~/server_linux -PID=tsserver2.pid"
Error starting daemon. Aborted
# su teamspeak
bash-3.00$ cd ~
bash-3.00$ ./server_linux -PID=tsserver2.pid
TeamSpeak Server Daemon started with PID 4674
bash-3.00$ exit
# su teamspeak -c "~/server_linux -PID=tsserver2.pid"
Error starting daemon. Aborted
# su teamspeak
bash-3.00$ cd ~
bash-3.00$ ./server_linux -PID=tsserver2.pid
TeamSpeak Server Daemon started with PID 4674
bash-3.00$ exit
su teamspeak -c "(cd ~teamspeak ; ./server_linux -PID=./tsserver2.pid)"
#! /bin/bash
# Copyright (c) 2004 TeamSpeak team All rights reserved.
#
# Author: pwk.linuxfan 2004
# Modified by Derek "Cybernaut" Jackson - www.DigitalNines.com
# Modified By Sylvain Gomez - sylvaingomez AT free.fr
#
# chkconfig: 345 85 15
# description: Runs and kills TeamSpeak Voice server at boot time and shutdown.
# Source function library.
#. /etc/rc.d/init.d/functions
# START OF CONFIG SECTION
# WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT
USER=teamspeak
DIR=/opt/teamspeak
# END OF CONFIG SECTION
# See how we were called.
case "$1" in
start)
if [ -e $DIR/tsserver2.pid ]; then
echo "tsserver2.pid already exists...server already started ?";
echo "If you are sure the server is not running, delete tsserver2.pid"
exit 1
else
if [ "$UID" = "0" ]; then
for c in $(seq 1 10); do
echo -n "!"
sleep 1
done
echo !
fi
echo "Starting the TeamSpeak Voice server..."
if [ -e $DIR/server_linux ]; then
if [ ! -x $DIR/server_linux ]; then
echo "server_linux is not executable; trying to set it."
chmod u+x $DIR/server_linux
fi
if [ -x $DIR/server_linux ]; then
WD=`pwd`
cd $DIR
su $USER -c "$DIR/server_linux -PID=tsserver2.pid" &
cd $WD
else
echo "server_linux is not executable; fix this."
exit 4
fi
else
echo "Couldnt find server_linux."
exit 5
fi
fi
;;
stop)
if [ -e $DIR/tsserver2.pid ]; then
echo -n "Stopping the TeamSpeak Voice server..."
if ( kill -TERM `cat $DIR/tsserver2.pid` ); then
for c in $(seq 1 300); do
if [ -e $DIR/tsserver2.pid ]; then
echo -n "."
sleep 1
fi
done
fi
if [ -e $DIR/tsserver2.pid ]; then
echo "server does not shutdown cleanly - killing"
kill -KILL `cat $DIR/tsserver2.pid`
rm $DIR/tsserver2.pid
sleep 5
else
echo "done"
fi
else
echo "tsserver2.pid is missing; is the server stopped already?"
#exit 7 - Should not be here as doesn't allow restart if server is already stopped.
fi
;;
restart)
$0 stop && $0 start || exit 1
;;
status)
if [ -e $DIR/tsserver2.pid ]; then
echo "The TeamSpeak Voice server is running."
exit 0
else
echo "The TeamSpeak Voice server is stopped."
exit 3
fi
;;
passwords)
if [ -e $DIR/server.log ]; then
date=$(cat $DIR/server.log | grep "admin account info: username: admin" | tail -n 1 | sed "s/^\([0-9]\+-[0-9]\+-[0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+\).*$/\1/")
spass=$(cat $DIR/server.log | grep "superadmin account info: username: superadmin" | tail -n 1 | sed "s/^.*username: superadmin password: \([a-z0-9]\+\).*$/\1/")
pass=$(cat $DIR/server.log | grep "admin account info: username: admin" | tail -n 1 | sed "s/^.*username: admin password: \([a-z0-9]\+\).*$/\1/")
echo "Following passwords were generated on $date"
echo "superadmin = \"$spass\""
echo "admin = \"$pass\""
else
echo "server.log not found; maybe the server has not been started yet?"
exit 1
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status|passwords}"
exit 2
esac
exit 0
if [ "$UID" = "0" ]; then
for c in $(seq 1 10); do
echo -n "!"
sleep 1
done
echo !
fi
J'ai peut être une idée concernant le lancement du service : quand il est lancé par ROOT, la boucle renvoi "!!!!!!!!!!" avant de lancer le service. Quand le service est lancé au démarrage, il n'y a pas ces '!' puisque ce n'est plus ROOT qui le lance
- Code: Tout sélectionner
if [ "$UID" = "0" ]; then
for c in $(seq 1 10); do
echo -n "!"
sleep 1
done
echo !
fi
ps -e | grep $$ | awk '{print $2}'
Retour vers E-Smith / SME Server
Utilisateur(s) parcourant actuellement ce forum : Google [Bot] et 1 invité