- Mon Sep 02, 2013 4:25 pm
#1867
is there a tutorial to make TS3MusicBot run when the server is restarted. This tutorial use init.d scripts to run. sorry for my bad english. I use google translation and I'm from Indonesia.
First create a file with the following command :
after booting you can check TS3MusicBot been running
First create a file with the following command :
Code: Select all
Copy and paste the following code then save : (NB : please edit before saving)
#nano /etc/init.d/ts3music
Code: Select all
now we will make chmod to ts3music file with the following code :
#!/bin/sh
#chkconfig: 2345 99 10
USER="teamspeak3-music" #replace with your server user
TS3M='/home/teamspeak3-music/TS3MusicBot' #TS3MusicBot Directory
cd $TS3M
case "$1" in
'start')
su $USER -c "screen -m -d -S TS3Music ./TS3MusicBot_runscript.sh -account YOUR_ACCOUNT -webif-pw YOUR_PASSWORD -webif-pw-user YOUR_USER_PASSWORD"
;;
'stop')
su $USER -c "screen -X -S TS3Music quit"
;;
*)
echo "Usage $0 start|stop"
esac
Code: Select all
in this section we will configure ts3music to 2345 with the following code : (NB : before configuration make sure sysv-rc-conf has been installed)
chmod 755 /etc/init.d/ts3music
Code: Select all
then reboot.sysv-rc-conf --level 2345 ts3music on
after booting you can check TS3MusicBot been running
Code: Select all
Finnished.#su teamspeak3-music
#screen -ls