• 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.

Solved How to run on startup

Status
Not open for further replies.

mm75

New Member
How do I get sinusbot to run on startup?

Im using a linux Ubuntu 14.10 server.
My server turns off everyday at a specific time and back on the next day. How can i get the bot to turn on as soon as the machine boots?
 

mm75

New Member

mxschmitt

Moderator
Staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
Did you changed the folder path of the bot?
Are the permissins of the user,which you set in the config for the bot ok?
Is in the logfile anything?
Do you have "screen"?
 

mm75

New Member
Did you changed the folder path of the bot?
Are the permissins of the user,which you set in the config for the bot ok?
Is in the logfile anything?
Do you have "screen"?
the problem is only with the script however. The bot works perfectly as long as i manually start through ssh. the problem lies in how the script won't start or stop the bot
 

mxschmitt

Moderator
Staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
The script works perfectly. I think your settings in the script are not correct
 

mm75

New Member
that is not a kind of start/stop/status/script for /etc/init.d/sinusbot.
follow that tutorial: https://forum.sinusbot.com/threads/start-stop-restart-autostart-script.1241/

Sorry, I think i didn't phrase what i wanted to say properly. my sinusbot is set up EXACTLY like on the link i provided earlier.
I have also already done all the steps on https://forum.sinusbot.com/threads/start-stop-restart-autostart-script.1241/.
but whenever i use service sinusbot start i get the message already running, when it isn't. when i use service sinusbot stop i get:
awk: line 2: function strtonum never defined
/etc/init.d/sinusbot: 110: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
kill -l [exitstatus]
Not stopped; may still be shutting down or shutdown may have failed

the script is already in /etc/init.d and it is named sinusbot
 

mm75

New Member
no idea then? craaaaaap.....
is there perhaps a way to at least start the bot using crontab?
Its one of the first things i tried before posting here but i couldn't get to work either
 

mm75

New Member
As i sayd already in the Chat use: https://forum.sinusbot.com/resources/linux-bootscript-for-the-sinusbot.6/ this works if you configure it right...
The script you provided seemed to work much better than https://forum.sinusbot.com/threads/start-stop-restart-autostart-script.1241/
after a bit of fiddling and reading some the error messages the script gave me, i found out that apparently the wrong type of " was used. don't know if they were already in the script or i replaced them by accident but hey, it works now so thanks to both of you.
So if i want to start the bot on startup now would i put something like
@reboot sudo service ts3bot start
into crontab?
 

mxschmitt

Moderator
Staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
no simply type:
sudo update-rc.d sinusbot defaults
 

mm75

New Member
no simply type:
sudo update-rc.d sinusbot defaults
So the bot now launches on startup and joins the tsp server
but it doesn't play anything and times out after a few min. Telling the bot to play music using the web interface also seems to have stopped doing anything
 

mm75

New Member
i got it working fine using crontab (even if its not the right/best way to do it) so ill stick with that.
Thank you guys
 
Status
Not open for further replies.
Top