-
Notifications
You must be signed in to change notification settings - Fork 0
/
ts3_install_start.sh
53 lines (45 loc) · 1.48 KB
/
ts3_install_start.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#/bin/bash
#debug
echo TeamspeakURL: ${TEAMSPEAK_DOWNLOAD_URL}
#get TEAMSPEAK SERVER and extract
wget -O /home/ts3/teamspeak3-server_linux_amd64.tar.bz2 ${TEAMSPEAK_DOWNLOAD_URL}
tar --directory /home/ts3 -xjf /home/ts3/teamspeak3-server_linux_amd64.tar.bz2
#remove archive
rm /home/ts3/teamspeak3-server_linux_amd64.tar.bz2
#debug
ls -lah /data
#check Files and link them to the TS3 Server
if [ -f /data/licensekey.dat ]
then
echo "Found LicenseKey";
ln -s /data/licensekey.dat /home/ts3/teamspeak3-server_linux_amd64/licensekey.dat
fi
if [ -f /data/query_ip_blacklist.txt ]
then
echo "Found BlacklistFile";
ln -s /data/query_ip_blacklist.txt /home/ts3/teamspeak3-server_linux_amd64/query_ip_blacklist.txt
fi
if [ -f /data/query_ip_whitelist.txt ]
then
echo "Found WhitelistFile";
ln -s /data/query_ip_whitelist.txt /home/ts3/teamspeak3-server_linux_amd64/query_ip_whitelist.txt
fi
#if Volume is mounted create database file on volume
if [ -d /data ] && [ ! -f /data/ts3server.sqlitedb ]
then
touch /data/ts3server.sqlitedb
fi
if [ -f /data/ts3server.sqlitedb ]
then
echo "Found ts3server Database file"
ln -s /data/ts3server.sqlitedb /home/ts3/teamspeak3-server_linux_amd64/ts3server.sqlitedb
fi
#debug
ls -lah /data
#check if there is a files directory and copy it to the Server directory
if [ -d /data/files ]
then
echo "Found files Directory ! ";
ln -s /data/files /home/ts3/teamspeak3-server_linux_amd64/files
fi
/home/ts3/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh