Teaspeak Create a start / stop script
Create / fill in /etc/init.d/teaspeak with your favorite editor. The path and the user must be adjusted accordingly. Since I have taken from the comments that not everyone here with vi experiences, you should perhaps use a different editor (joe or nano). Short vi instructions: (with "i" you get into the insert mode, because the script can be copied in, with "ESC: q" the VI is stopped and saved)
insert
Make script executable:
The script is ready and needs to be defined as an autostart:
The next reboot will start the Teaspeak server automatically.
Options of the script start / stop / restart:
Teaspeak Server start:
Teaspeak Server stop:
Teaspeak Server restart:
Create / fill in /etc/init.d/teaspeak with your favorite editor. The path and the user must be adjusted accordingly. Since I have taken from the comments that not everyone here with vi experiences, you should perhaps use a different editor (joe or nano). Short vi instructions: (with "i" you get into the insert mode, because the script can be copied in, with "ESC: q" the VI is stopped and saved)
Code:
vi /etc/init.d/teaspeak
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: teaspeak
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Teaspeak Server
### END INIT INFO
# INIT Script by BIOS
######################################
# Customize values for your needs: "User"; "DIR"
USER="yourusername"
DIR="pfadtoteaspeakdir"
###### Teaspeak server start/stop script ######
case "$1" in
start)
su $USER -c "${DIR}/teastart_minimal.sh start"
;;
stop)
su $USER -c "${DIR}/teastart_minimal.sh stop"
;;
restart)
su $USER -c "${DIR}/teastart_minimal.sh restart"
;;
*)
echo "Usage: {start|stop|restart}" >&2
exit 1
;;
esac
exit 0
Code:
chmod 755 /etc/init.d/teaspeak
Code:
update-rc.d teaspeak defaults
Options of the script start / stop / restart:
Teaspeak Server start:
Code:
/etc/init.d/teaspeak start
Code:
/etc/init.d/teaspeak stop
Code:
/etc/init.d/teaspeak restart
Last edited: