From ffbd2f98fed96113aa88e8764d40511cbfd88507 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Fri, 6 Nov 2015 22:39:58 +0100 Subject: [PATCH 1/3] Update README with sane install instructions. The original text has probably been written by a sleepy me from the past. --- README.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index d2f953a..68ea475 100644 --- a/README.md +++ b/README.md @@ -12,36 +12,41 @@ that OS). We assume that we want to run the "develop" branch of TS3Bot here. You can easily replace "develop" with another branch you want to run, like "master" for the stable code. -Commands being run as your own user are marked with `$` and commands being run as root are marked with `#`. +We create a separate user "ts3bot" for this bot using the command below - do not run this on your own user if you use TeamSpeak3 on it as the bot will overwrite the configuration of the client later! -- Install the dependencies: + # adduser --disabled-login --disabled-password ts3bot - $ apt-get install blackbox xvfb xdotool pulseaudio pulseaudio-utils cmake libvlc-dev vlc-plugin-pulse +And we access the user's shell usually via: -- Create a new user to run TS3Bot on - do not run this on your own user if you use TeamSpeak3 on it as that will overwrite your configuration! + # sudo -u ts3bot -s -H - # adduser --system --disabled-login --disabled-password ts3bot +Commands being run as your bot user (`ts3bot`) are marked with `$` and commands being run as root are marked with `#`. -- Download and unpack TeamSpeak3 client for your platform into a folder accessible by the TS3Bot user. Only read access is required. Replace `3.0.18.2` with whatever version of TeamSpeak3 you prefer to install, usually that is the most recent one. Accept the license that shows up in the process. +- Install the dependencies, optionally add `git` if you are going to use the git client for cloning the source code later: - # wget -Ots3client.run http://dl.4players.de/ts/releases/3.0.18.2/TeamSpeak3-Client-linux_$(uname -p)-3.0.18.2.run - # chmod +x ts3client.run - # ./ts3client.run --target ~ts3bot/ts3client - # rm ts3client.run + # apt-get install node-dev blackbox xvfb xdotool pulseaudio pulseaudio-utils cmake libvlc-dev vlc-plugin-pulse + +- Download and unpack TeamSpeak3 client for your platform into a folder accessible by the TS3Bot user. Only read access is required. Replace `3.0.18.2` with whatever version of TeamSpeak3 you prefer to install, usually that is the most recent one. Accept the license that shows up in the process. Also replace `amd64` with `x86` if you're on a 32-bit system. + + $ cd ~ + $ wget -Ots3client.run http://dl.4players.de/ts/releases/3.0.18.2/TeamSpeak3-Client-linux_amd64-3.0.18.2.run + $ chmod +x ts3client.run + $ ./ts3client.run --target ~ts3bot/ts3client + $ rm ts3client.run - Download the TS3Bot control application into your TS3Bot user's home folder. The TS3Bot user itself only needs read access to the code. You can do this in two ways: o By downloading the tar.gz archive from GitHub and unpacking it. - # wget -q -O- https://github.com/icedream/ts3bot-control/archive/develop.tar.gz | tar xz -C ~ts3bot + $ wget -q -O- https://github.com/icedream/ts3bot-control/archive/develop.tar.gz | tar xz -C ~ o By cloning the Git repository from GitHub. - # git clone https://github.com/icedream/ts3bot-control -b develop ~ts3bot/ts3bot-control-develop + $ git clone https://github.com/icedream/ts3bot-control -b develop ~/ts3bot-control-develop - Install the Node.js dependencies using `npm`. Note how a simple `npm install` will install the wrong version of WebChimera.js and you need to provide it with correct Node.js information (environment variables `npm_config_wcjs_runtime` and `npm_config_wcjs_runtime_version`) like this: - # cd ~ts3bot/ts3bot-control-develop - # npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" npm install + $ cd ~ts3bot/ts3bot-control-develop + $ npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" npm install - Now set up your TS3Bot configuration files in your TS3Bot user's home folder. For this create a folder `.ts3bot` in the home directory and put a `config.json` with your configuration there. The most minimal configuration consists of: o `identity-path` - The path to your identity INI file, export a newly generated identity from your own TeamSpeak3 client for that. @@ -50,6 +55,6 @@ Commands being run as your own user are marked with `$` and commands being run a Running the bot can finally be done like this: - $ sudo -u ts3bot -H node ~ts3bot/ts3bot-control-develop + $ node ~/ts3bot-control-develop You can provide your configuration as command line arguments instead if you want, that can be useful for just temporary configuration you want to test. For that just append the configuration options to the command line above and prefix every command line option with `--`, for example for `ts3-install-path` you would write `--ts3-install-path=/your/path/to/ts3client` From 529bf84fcd9313e62df850f6c1fbf1f42e9f1bcb Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Fri, 6 Nov 2015 22:41:17 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 68ea475..63e8bce 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Commands being run as your bot user (`ts3bot`) are marked with `$` and commands $ rm ts3client.run - Download the TS3Bot control application into your TS3Bot user's home folder. The TS3Bot user itself only needs read access to the code. You can do this in two ways: + o By downloading the tar.gz archive from GitHub and unpacking it. $ wget -q -O- https://github.com/icedream/ts3bot-control/archive/develop.tar.gz | tar xz -C ~ @@ -49,6 +50,7 @@ Commands being run as your bot user (`ts3bot`) are marked with `$` and commands $ npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" npm install - Now set up your TS3Bot configuration files in your TS3Bot user's home folder. For this create a folder `.ts3bot` in the home directory and put a `config.json` with your configuration there. The most minimal configuration consists of: + o `identity-path` - The path to your identity INI file, export a newly generated identity from your own TeamSpeak3 client for that. o `ts3-install-path` - The path where you installed the TeamSpeak3 client to, you can skip this if you used exactly the same path as in the instructions above. o `ts3-server` - The URL to the server/channel you want the bot to connect to, you can get from your own TS3 client via "Extras" > "Invite friend", select the checkbox "Channel" and select "ts3server link" as invitation type. From 5abb132faef7b2d228bcc417add99a16fcaf4545 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Fri, 6 Nov 2015 22:41:39 +0100 Subject: [PATCH 3/3] Update README.md Fix formatting. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 63e8bce..46a0302 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,9 @@ Commands being run as your bot user (`ts3bot`) are marked with `$` and commands - Now set up your TS3Bot configuration files in your TS3Bot user's home folder. For this create a folder `.ts3bot` in the home directory and put a `config.json` with your configuration there. The most minimal configuration consists of: o `identity-path` - The path to your identity INI file, export a newly generated identity from your own TeamSpeak3 client for that. + o `ts3-install-path` - The path where you installed the TeamSpeak3 client to, you can skip this if you used exactly the same path as in the instructions above. + o `ts3-server` - The URL to the server/channel you want the bot to connect to, you can get from your own TS3 client via "Extras" > "Invite friend", select the checkbox "Channel" and select "ts3server link" as invitation type. Running the bot can finally be done like this: