teamspeak3/scripts/docker-ts3.sh

43 lines
1.7 KiB
Bash
Raw Normal View History

2014-04-15 12:04:04 +00:00
#!/bin/bash
2014-04-15 12:27:20 +00:00
VOLUME=/teamspeak3
2014-04-15 12:04:04 +00:00
2014-04-16 09:39:55 +00:00
echo " ----- docker-ts3 ------"
echo "1. Check if ts3server.sqlitedb exists in host-mounted volume."
2014-04-15 12:04:04 +00:00
if [ -f $VOLUME/ts3server.sqlitedb ]
then
2014-04-16 09:39:55 +00:00
echo "$VOLUME/ts3server.sqlitedb found. Creating Link between host-mounted db-file and ts3-folder."
2014-04-15 12:51:47 +00:00
ln -s $VOLUME/ts3server.sqlitedb /opt/teamspeak3-server_linux-amd64/ts3server.sqlitedb
2014-04-15 12:04:04 +00:00
fi
2015-01-16 18:54:47 +00:00
echo "2. Link the files-folder into the host-mounted volume."
mkdir -p /teamspeak3/files
if ! [ -L /opt/teamspeak3-server_linux-amd64/files ]; then
rm -rf /opt/teamspeak3-server_linux-amd64/files
ln -s /teamspeak3/files /opt/teamspeak3-server_linux-amd64/files
fi
2014-04-15 12:04:04 +00:00
2014-04-16 09:39:55 +00:00
echo "3. Starting TS3-Server."
echo "Check if ts3server.ini exists in host-mounted volume."
2015-01-16 18:54:47 +00:00
if [ -f $VOLUME/ts3server.ini ]; then
2014-04-16 09:39:55 +00:00
echo "$VOLUME/ts3server.ini found. Using ini as config file."
echo "HINT: If this ini was transfered from another ts3-install you may want to make sure the following settings are active for the usage of host-mounted volume: (OPTIONAL)"
echo "query_ip_whitelist='/teamspeak3/query_ip_whitelist.txt'"
echo "query_ip_backlist='/teamspeak3/query_ip_blacklist.txt'"
echo "logpath='/teamspeak3/logs/'"
echo "licensepath='/teamspeak3/'"
echo "inifile='/teamspeak3/ts3server.ini'"
/opt/teamspeak3-server_linux-amd64/ts3server_minimal_runscript.sh \
inifile="/teamspeak3/ts3server.ini"
2015-01-16 18:54:47 +00:00
else
2014-04-16 09:39:55 +00:00
echo "$VOLUME/ts3server.ini not found. Creating new config file."
/opt/teamspeak3-server_linux-amd64/ts3server_minimal_runscript.sh \
query_ip_whitelist="/teamspeak3/query_ip_whitelist.txt" \
query_ip_backlist="/teamspeak3/query_ip_blacklist.txt" \
logpath="/teamspeak3/logs/" \
licensepath="/teamspeak3/"
inifile="/teamspeak3/ts3server.ini" \
createinifile=1
fi
2014-04-15 12:04:04 +00:00