-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker.php
32 lines (25 loc) · 1009 Bytes
/
docker.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
// THIS FILE IS MENT TO BE RUN BY DOCKER!
date_default_timezone_set(getenv("TZ"));
//require the ts3 lib
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
//require the ts3clock class
include('ts3clock.php');
try {
$USER = getenv("USER");
$PW = getenv("PW");
$HOST = getenv("HOST");
$QUERY_PORT = getenv("QUERY_PORT");
$SERVER_PORT = getenv("SERVER_PORT");
//Default username: serveradmin
//Default query port: 10011
//Default Server port: 9987
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://$USER:$PW@$HOST:$QUERY_PORT/?server_port=$SERVER_PORT");
//run the loop
//you can find the channelid with: YaTQA (just google it)
ts3clock::clock_startloop($ts3_VirtualServer, array(getenv("CHANNELID_1"), getenv("CHANNELID_2"), getenv("CHANNELID_3")));
} catch (Exception $e) {
//Console output: Echo the error message
echo $e->getMessage();
}
?>