WHMCS-Modules / TS3-Musicbot provisioning
  • PHP 94.6%
  • Go Template 5.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alex von Firesplash 62386aac3c Add LICENSE
2019-08-02 08:16:52 +02:00
lang Verion 1.0b 2017-09-13 11:28:46 +02:00
.gitignore licensing 2017-11-30 14:56:21 +01:00
config.php.dist licensing 2017-11-30 14:56:21 +01:00
LICENSE Add LICENSE 2019-08-02 08:16:52 +02:00
README.md Update README.md 2018-02-03 13:24:35 +01:00
ts3mb_clientarea.tpl Verion 1.0b 2017-09-13 11:28:46 +02:00
ts3musicbot.php Update ts3musicbot.php for user pw bug and regex not throwing errors 2018-05-09 14:24:40 +02:00
TS3MusicBotAPI.php licensing changes 2018-02-02 13:11:43 +01:00

"INSTALL"

  1. Copy this module into your modules/server folder.
  2. Rename config.php.dist to config.php
  3. Enter your license key into the field in config.php
  4. Install a linux server (Debian is recommended) and create an unprivileged user for your bots.
  5. Log in as the created user and download the TS3MusicBot into the home directory: https://www.ts3musicbot.net/index.php?mode=account&tab=hoster_api Extract the Bot file into a folder called TS3MusicBot - This will be the "skeleton folder". Every bot will be an exact copy of this folder when being provisioned. Hint: The folder structure will look like this: /home/username/TS3MusicBot/TS3MusicBot_runscript.sh The provisioned bot folders will look like this: /home/username/TS3MB_/
  6. Setup a server in WHMCS. Inmportant parts are: Hostname IP Address Max. count of accounts As Type of server select "TS3MusicBot Provisioning" Under Username enter the name of the created user on this server For password use the according password of course... Access Hash can be used to define special parameters (see later on, leave blank for now) You can leave the "secure" field unchecked - it is not used The port should be the SSH port of your server You can create aserver group if you want. That is WHMCS inner mechanic. It is not required though.
  7. Setup a Product, select TS3MusicBot Provisioning as module and configure accordingly: Hoster Key: You can get this from ts3musicbot.net First WebIF Port: The TS3MB opens a Web Interface on a dedicated port for each instance. You can insert the first allowed port here. Port range will be "first port" up to "first port + max accounts" for each server. Storage Quota: Hoy many storage should be available for this product? This can be overridden by a configurable option with technical name "hdd" You also need to setup a few custom fields for the product.

"Custom Fields for the product"

Name: TS3Server Type: Text, required on order Content: TS3 Server Hostname without port or TSDNS Regex (example): /((?=^.{1,254})(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?!-)\.?)+(?:[a-zA-Z]{2,}))|(\d{0,3}.){3}(\d{0,3}))/

Name: TS3Port Type: Text, required on order Content: TS3 Server Port (ignored but also required when using TSDNS) Regex (example): /^\d{1,5}$/

Name: AdminPassword Type: Password or Text, required on order Content: Admin Password for Webinterface

Name: UserPassword Type: Password or Text, required on order Content: User Password for Webinterface

Name: UseServerQuery Type: Checkbox, required on order Content: If Bot should be able to connect using server query

If you do not like the technical names to be displayed you can use WHMCS' naming feature. e.g. "TS3Server|TeamSpeak Server Hostname"

"MySQL Table Setup"

Please run this on your database before installing the module:

CREATE TABLE mod_ts3musicbot_instances ( tmb_serviceid INT(10) UNSIGNED NOT NULL, tmb_server INT(10) UNSIGNED NOT NULL, tmb_license VARCHAR(50) NULL DEFAULT NULL, tmb_wwwport SMALLINT(5) UNSIGNED NOT NULL, PRIMARY KEY (tmb_serviceid), UNIQUE INDEX tmb_license (tmb_license), INDEX tmb_server (tmb_server) ) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB;

"ACCESS HASH"

There are a few more options configurable in Server settings using the access hash field. The syntax is name=value every option on a new line: If your server is behind a firewall you might want it to listen on another IP different from the public IP (of course you have to NAT-redirect the ports on your firewall). You can use the parameter bind_ip for this task: bind_ip=192.168.123.210

More oprions might be added on demand in the future.