• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.
Sinusbot Installer Script

EN Sinusbot Installer Script 1.5

No permission to download

karkow

Member
Done
Starting Sinusbot again. Your admin password = 'sDYXyS7j'
Using following data:
USER: sinusbot
DIR ROOT: /opt/ts3soundboard/
BOT RUN CMD: ./sinusbot

Starting sinusbot...
ERROR: /opt/ts3soundboard/ is not a directory
Please wait... This will take some seconds!
Sinusbot could not start! Starting it directly. Look for errors!
____________________________
Why ts3soundboard folder? Where to change this?

Ok. i found this. -> /etc/init.d/sinusbot....

sinusbot installer script change config to /opt/ts3soundboard. I have /opt/sinusbot...
 
Last edited:

Qhiliqq

Donor
is awesome!
Contributor
Insider
Licensed Partner
Can you please help me ? It say me :

Failed to start sinusbot.service: Unit sinusbot.service failed to load: Invalid argument. See system logs and 'systemctl status sinusbot.service' for details.
Please wait... This will take some seconds!
Sinusbot could not start! Starting it directly. Look for errors!
Could not open /tmp/.sinusbot.lock. Is SinusBot already running?
@Xuxe

Done
Starting Sinusbot again. Your admin password = 'sDYXyS7j'
Using following data:
USER: sinusbot
DIR ROOT: /opt/ts3soundboard/
BOT RUN CMD: ./sinusbot

Starting sinusbot...
ERROR: /opt/ts3soundboard/ is not a directory
Please wait... This will take some seconds!
Sinusbot could not start! Starting it directly. Look for errors!
____________________________
Why ts3soundboard folder? Where to change this?

Ok. i found this. -> /etc/init.d/sinusbot....

sinusbot installer script change config to /opt/ts3soundboard. I have /opt/sinusbot...
Can't reproduce this error.. Hmm I've checked the script and can't found the problem... Which OS?

Someone knows how we can export our music of the sinusbot to our computer ?
Wrong Thread.
 

KiurZima123

New Member
@Xuxe


Can't reproduce this error.. Hmm I've checked the script and can't found the problem... Which OS?


Wrong Thread.
I have anWser you but you dont see it..

I said:

[Unit]
Description=Sinusbot the Teamspeak 3 and Discord MusicBot.
After=syslog.target network.target
[Service]
User=sinusbot
ExecStartPre=rm -f /tmp/.sinusbot.lock
ExecStopPost=rm -f /tmp/.sinusbot.lock
ExecStart=/opt/sinusbot/sinusbot
WorkingDirectory=/opt/sinusbot
Type=simple
KillSignal=2
SendSIGKILL=yes

[Install]
WantedBy=multi-user.target
 

Qhiliqq

Donor
is awesome!
Contributor
Insider
Licensed Partner
I have anWser you but you dont see it..

I said:

[Unit]
Description=Sinusbot the Teamspeak 3 and Discord MusicBot.
After=syslog.target network.target
[Service]
User=sinusbot
ExecStartPre=rm -f /tmp/.sinusbot.lock
ExecStopPost=rm -f /tmp/.sinusbot.lock
ExecStart=/opt/sinusbot/sinusbot
WorkingDirectory=/opt/sinusbot
Type=simple
KillSignal=2
SendSIGKILL=yes

[Install]
WantedBy=multi-user.target
Fixed by xuxe.
Update the bot with the installer :)
 

Qhiliqq

Donor
is awesome!
Contributor
Insider
Licensed Partner
Qhiliqq aktualisierte Sinusbot Installer Script mit einem neuen Eintrag:

Fixed bugs, adding pwreset

### German ###
Neue Version verfügbar.

Changelog:
  • PW-Reset Option hinzugefügt
  • kleinere Bugfixes
Bei Fehlern und Problemen bitte erst in dem Reiter Diskussion das Problem schildern und nicht gleich eine schlechte Bewertung geben, denn so kann ich euch nicht helfen.

### English ###
New version available.

Changelog:
  • added pw-reset option
  • some bugfixes
If you have bugs or problems use first the discuss tab and write down the problem, before you write...

Weitere Informationen zur Aktualisierung...
 
Hello, please help. i use the installer and everything goes well, but i need the teamspeak 3 runscript.sh otherwise i cannot start the teamspeak 3 client and the installer doesnt install the sh ts3client-runscript.sh, how should i proceed?

thank you.
 

Xuxe

Containerholic
Staff member
is awesome!
V.I.P.
Contributor
Insider
Hello, please help. i use the installer and everything goes well, but i need the teamspeak 3 runscript.sh otherwise i cannot start the teamspeak 3 client and the installer doesnt install the sh ts3client-runscript.sh, how should i proceed?

thank you.

You have nothing to do directly with the Teamspeak 3 Client, the Bot does everything for you. Instead of trial and error tell us please directly what your problem is before you break the whole system.
 

Russo

New Member
hi, im using Debian GNU/Linux 8.7, i used to be a linux user, but it was long time ago, my 1st linux was slackware 97 and i dont use linux since 2003, so whatever i learned is gone and im back to noob level. :D

so i have ts server and im building a site, i thought, well it would be cool to have a music bot and since im going to get a vps, it would be nice to set my own linux and learn something, so i can get everything up and running on my vps, that is why i choose devian 8, it will be the same OS on the vps.

Anyway, i download the script and i run it from the copy url thing, so after it was done i noticed some erros, in the review the "Author's Response" told me that i should post it here:

Version: 1.3.3
install script:
==========
Done
Starting Sinusbot again. Your admin password = '*****'
Please wait... This will take some seconds!
/dev/fd/63: line 948: /etc/init.d/sinusbot: No such file or directory
/dev/fd/63: line 948: [: ==: unary operator expected
Install done!
===========

if i do: crontab -u sinusbot -l
i get: no crontab for sinusbot

Also, if i go to /etc/init.d

there is nothing about sinusbot there.

So, im kinda new to this, so my take from this error, is that the sinusbot will not start because it's not inside "/etc/init.d/", something failed, right now the bot is on my channel and playing music, but if i restart the server, the bot will not start by itself, right?

i was searching about some erros and i keep finding ppl talking about "ts3soundboard", there is no such directory in my files, maybe they are talking about old version.

so, what script i need to put inside "/etc/init.d" ?

i think if i get the right script to put inside init.d, i think i can do the rest wiht:
chmod 755 /etc/init.d/bot_script
update-rc.d bot_script defaults

right?

if i download the new version of the auto insall and choose "update" it will skip all the install stuffs and just update the bot and auto start or someting else? can i set the auto start manually, could some1 be kind enough to point me to the right direction, thx.


EDIT:

should i just copy the sinusbot file that is inside "/opt/sinusbot/" to "/etc/init.d/"
and then: update-rc.d sinusbot defaults
??
 
Last edited:
You have nothing to do directly with the Teamspeak 3 Client, the Bot does everything for you. Instead of trial and error tell us please directly what your problem is before you break the whole system.
Hello. Firstly, Thank you very much for the quick reply. its exactly as you said, the bot is independent, the problem i was having was that i came from a Windows 7, and on Windows the bot only works connected with TS3, and on linux, i just found out that it works alongside the Terminal. 1 question, how do i pull entire playlists from youtube? i ended up installing SinusBot through the tar.bz2, and sinces its working im not going to mess with it, just be content. Thank you. Appreciate the help. Just started using linux a couple days ago, Ubuntu 16.10.
 

Russo

New Member
i used the script to update the bot, now after i reboot, its starting by itself, i see its using systemd.

It's working, but i noticed something, if for whatever reason, the bot lose connection, it doesnt connect to the teamspeak server anymore, for instance, the bot is running my debian 8 pc, i lost connection to the internet, when my internet is up again, the bot doesnt auto connect to the teamspeak server(external IP), i have to restart the bot via command line or via browser.

In my TS3 client, if i lose connection, it auto reconnect as soon as my internet is up.

is there anything that can be done about this or there is something wrong with my configuration?
 

Freshhalte

Member
Moin Moin.

Ich habe mal einen Frage zu Installer Script, denn bei mir funktioniert es nicht. Anscheinend kann es Teamspeak nicht runterladen:

Code:
This is the automatic installer for latest Sinusbot. USE AT YOUR OWN RISK!
You can choose between installing, upgrading and removing the Sinusbot.
Installer by Philipp Esswein | DAThosting.eu - Your game-/voiceserver hoster (only german).
Please rate this script at: https://forum.sinusbot.com/resources/sinusbot-installer-script.58/
You're using Installer 1.3.3
What should the Installer do?
1) Install
2) Update
3) Remove
4) PW Reset
5) Quit
#? 1
Check if lsb-release and debconf-utils is installed...
Done!
Detected OS debian
Detected branch jessie
Which start script should be used? system.d is prefered since Debian 8.
1) system.d
2) init.d
#? 1
Automatic usage or own directories?
1) Automatic
2) Own path
3) Quit
#? 1
Sinusbot isn't installed yet. Installer goes on.
This Sinusbot version is only for private use! Accept?
1) No
2) Yes
#? 2
Update the system packages to the latest version? Recommended, as otherwise dependencies might break! Option "No" = Exit
1) Yes
2) Try without
3) No
#? 1
Start installer now!
Updating the system in a few seconds silently (no optical output)!
This could take a while. Please give it up to 10 minutes!
Installing necessary packages! Please wait...
Packages installed!
Please enter the name of the sinusbot user. Typically "sinusbot". If it does not exists, the installer will create it.
Username [sinusbot]:
Your sinusbot user is: sinusbot
User "sinusbot" already exists.
Downloading TS3 client files.
Installing the TS3 client.
Read the eula!
Do the following: Press "ENTER" then press "q" after that press "y" and accept it with another "ENTER".
cp: cannot stat './TeamSpeak3-Client-linux_amd64/*': No such file or directory
rm: cannot remove './ts3client_runscript.sh': No such file or directory
rm: cannot remove './TeamSpeak3-Client-linux_amd64': No such file or directory
TS3 client install done.
Downloading latest Sinusbot.
Extracting Sinusbot files.

bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2
tar: Error is not recoverable: exiting now
cp: cannot stat 'plugin/libsoundbot_plugin.so': No such file or directory
chmod: cannot access 'sinusbot': No such file or directory
Sinusbot installation done.
Synchronizing state for sinusbot.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d sinusbot defaults
Executing /usr/sbin/update-rc.d sinusbot enable
Installed systemd file to start the Sinusbot with "service sinusbot {start|stop|status|restart}"
Config.ini already exists or creation error!
Installing Cronjob for automatic Sinusbot update...
Installing Sinusbot update cronjob successful.
YouTube-DL already installed. Checking for updates.
youtube-dl is up-to-date (2017.04.17)
Starting the Sinusbot. For first time.
bash: ./sinusbot: No such file or directory
/dev/fd/63: line 929: [: ==: unary operator expected
Done
Starting Sinusbot again. Your admin password = ''
Please wait... This will take some seconds!
Sinusbot could not start! Starting it directly. Look for errors!
bash: /opt/sinusbot/sinusbot: No such file or directory
 

Russo

New Member
i used the script to update the bot, now after i reboot, its starting by itself, i see its using systemd.

It's working, but i noticed something, if for whatever reason, the bot lose connection, it doesnt connect to the teamspeak server anymore, for instance, the bot is running my debian 8 pc, i lost connection to the internet, when my internet is up again, the bot doesnt auto connect to the teamspeak server(external IP), i have to restart the bot via command line or via browser.

In my TS3 client, if i lose connection, it auto reconnect as soon as my internet is up.

is there anything that can be done about this or there is something wrong with my configuration?

After some testing, it seems that if the bot lose the connection for a few minutes, in my case when my internet goes down, then when the internet is up, the bot wont reconnect, it will stay out of the Teamspeak server, it will only connect to the server if i do: systemctl restart sinusbot.service

so after searching, learning a little about bash script, i come up with a solution, the script check if the Teamspeak server is online, if not it just quit, if its online, it check if sinusbot service is active, if not it will start sinusbot, then it check if the bot is online on the teamspeak server, if not, it will restart sinusbot service and the bot will join the server, if bot is online on server, then it will quit.

if anyone is interested, check the code below, maybe some1 can make it better, i made a crontab for myself, so the script will be executed every 10 minutes:
im on debian 8, so to do this you need to type crontab -e and add this

==============
SHELL=/bin/bash
#check every 10 minutes
*/10 * * * * /home/user/yourscipt.sh
============

Code:
#!/bin/bash

  _instance="1"                   #server id
  _user="xxxxxx"                #query_user
  _pass="xxxx"                    #query_password
  _host="0.0.0.0"                #Add your TS3 IP
  _port="10011"
  _botname="radio"         #name of the bot, it will connect and get clientlist
  _logbotf="/home/user/botstatus.txt"    #logfile, change "user" to your username
  _logdel=1                 #change to "0" and log wont be deleted
  _minfilesize=20000   #if the size is bigger, then clear

if [[ "$_logdel" == 1 ]]; then
  if [[ -f "$_logbotf" ]]; then
    atusize=$(stat -c%s "$_logbotf")
    # echo "Size: $atusize"
    if [[ "$atusize" -ge "$_minfilesize" ]]; then
      # echo "clear log: File size ( $atusize ) is bigger than $_minfilesize"
      cat /dev/null > "$_logbotf"
    fi
  fi
fi

nc -z -w 4 -n "$_host" "$_port" < /dev/null
servup="$?"
isact="active"
curdate=$(date)
if [[ "$servup" == 0 ]]; then
# printf "value is $servup \n"
printf "\n===============================================" >> "$_logbotf"
info=$(systemctl status sinusbot.service | awk 'NR == 3')
printf "\nLog date: $curdate \nBot status: $info" >> "$_logbotf"
read prefix status rest <<< "$info"
if [[ "$status" = "$isact" ]]; then
  echo -e "use $_instance\nlogin $_user $_pass\nclientlist\nquit" | \
   nc "$_host" "$_port" | {
    trs=$(grep -i -o "$_botname")
    if [[ ! -z "$trs" ]]; then
      printf "\n$trs \nBot was found! Do nothing." >> "$_logbotf"
      exit 0
    else
      printf "\nBot was not found! Restarting bot..." >> "$_logbotf"
      systemctl restart sinusbot.service
     exit 1
    fi
   }
else
  printf "\n$curdate \nService is not active\nStarting service." >> "$_logbotf"
  systemctl start sinusbot.service
fi
else
printf "\n===============================================" >> "$_logbotf"
printf "\nLog date: $curdate \nServer is offline, do nothing." >> "$_logbotf"
fi
exit

Double check everything!
### USE AT YOUR OWN RISK ###
 

Qhiliqq

Donor
is awesome!
Contributor
Insider
Licensed Partner
I fix the upcoming issues asap.

The first fixes are already included.
 

LucaFalk

Member
Ich habe mir, den Bot über den netten Installer heruntergeladen.
Nachdem, ich einen Support-Script in das Script-Verzeichnis geladen habe,
möchte ich den Bot neustarten. Hmm, nur wie? c:

Liebe grüße!
 

Qhiliqq

Donor
is awesome!
Contributor
Insider
Licensed Partner
Ich habe mir, den Bot über den netten Installer heruntergeladen.
Nachdem, ich einen Support-Script in das Script-Verzeichnis geladen habe,
möchte ich den Bot neustarten. Hmm, nur wie? c:

Liebe grüße!
Bitte lies doch den Installer durch, wenn er fertig ist :(
Oder öffne die Readme, welche sich in /opt/sinusbot/ oder deinem gewählten Pfad befindet.

systemd: service sinusbot restart
initd: /etc/init.d/sinusbot restart

Einfach mal Augen auf ;)
Nich blind durch die Welt rennen :p
 

Qhiliqq

Donor
is awesome!
Contributor
Insider
Licensed Partner
Qhiliqq updated Sinusbot Installer Script with a new update entry:

Bugfixes

### German ###
Neue Version verfügbar.

Changelog:
  • Bugfixes
  • Error Handling wurde eingebaut
Bei Fehlern und Problemen bitte erst in dem Reiter Diskussion das Problem schildern und nicht gleich eine schlechte Bewertung geben, denn so kann ich euch nicht helfen.

### English ###
New version available.

Changelog:
  • bugfixes
  • added error handling to the script
If you have bugs or problems use first the discuss tab and write down the problem, before you...

Read the rest of this update entry...
 
I am getting this error constantly
I've tried windows 7 (64 bit) as well as Centos 6.3(64bit)

[root@localhost ts3soundboard]# ./sinusbot -RunningAsRootIsEvilAndIKnowThat
2017/04/25 20:12:01 [GENERAL/!!!!!!!] WARN !!!!!!! YOU ARE RUNNING THE BOT AS UID 0 (ROOT) WITHOUT HAVING SET ANOTHER UID. THIS IS A SERIOUS SECURITY VIOLATION !!!!!!!!
___ ___ _ _ _ _ ___ ___ ___ _____ BETA
/ __|_ _| \| | | | / __| _ )/ _ \_ _|
\__ \| || .` | |_| \__ \ _ \ (_) || |
|___/___|_|\_|\___/|___/___/\___/ |_|

Version: 0.9.18-8499d2c
(C) 2013-2016 Michael Friese. All rights reserved.

2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin advertising.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin aloneMode.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin badchan.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin bookmark.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin covatar.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin dev.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin followme.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin idle.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin metadata.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin norecording.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin rememberChannel.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin showcase.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin sound.js
2017/04/25 20:12:01 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin welcometext.js
2017/04/25 20:12:01 X [MAIN] Starting up fake x-server...
a manual update is required

[root@localhost ts3soundboard]# sudo ntpd -q -g
ntpd: time slew +0.029474s
[root@localhost ts3soundboard]# date
Tue Apr 25 20:13:56 PKT 2017
[root@localhost ts3soundboard]#

After Updating the time, Same Error
[root@localhost ts3soundboard]# ./sinusbot -RunningAsRootIsEvilAndIKnowThat
2017/04/25 20:14:22 [GENERAL/!!!!!!!] WARN !!!!!!! YOU ARE RUNNING THE BOT AS UID 0 (ROOT) WITHOUT HAVING SET ANOTHER UID. THIS IS A SERIOUS SECURITY VIOLATION !!!!!!!!
___ ___ _ _ _ _ ___ ___ ___ _____ BETA
/ __|_ _| \| | | | / __| _ )/ _ \_ _|
\__ \| || .` | |_| \__ \ _ \ (_) || |
|___/___|_|\_|\___/|___/___/\___/ |_|

Version: 0.9.18-8499d2c
(C) 2013-2016 Michael Friese. All rights reserved.

2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin advertising.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin aloneMode.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin badchan.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin bookmark.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin covatar.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin dev.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin followme.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin idle.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin metadata.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin norecording.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin rememberChannel.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin showcase.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin sound.js
2017/04/25 20:14:22 [GENERAL/SCRIPTS] INFO Loading ScriptPlugin welcometext.js
2017/04/25 20:14:22 X [MAIN] Starting up fake x-server...
a manual update is required
 
Top