Use working directory as data directory and cd correctly for ts3server.

3.0 3.0.13.6
Icedream 2017-04-09 22:56:33 +02:00
parent f0362fea3a
commit b6bba0b90b
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
2 changed files with 18 additions and 19 deletions

View File

@ -38,15 +38,6 @@ RUN \
chmod +x /usr/local/bin/docker-entrypoint && \
sed -i 's,\r,,g' /usr/local/bin/docker-entrypoint
RUN \
for path in \
files \
logs \
query_ip_blacklist.txt \
query_ip_whitelist.txt \
ts3server.sqlitedb; \
do \
ln -vsf "/data/${path}" "/opt/teamspeak3/${path}"; \
done
WORKDIR /data
VOLUME /data
ENTRYPOINT ["docker-entrypoint"]

View File

@ -2,17 +2,25 @@
# files and directories that should exist beforehand
mkdir -p \
/data/files \
/data/logs
files \
logs
touch \
/data/query_ip_blacklist.txt \
/data/query_ip_whitelist.txt \
/data/ts3server.sqlitedb
query_ip_blacklist.txt \
query_ip_whitelist.txt \
ts3server.sqlitedb
LD_LIBRARY_PATH="/opt/teamspeak3:${LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH
for path in \
files \
logs \
query_ip_blacklist.txt \
query_ip_whitelist.txt \
ts3server.sqlitedb; \
do \
ln -sf "$(pwd)/${path}" "/opt/teamspeak3/${path}"; \
done
/opt/teamspeak3/ts3server "$@" &
cd /opt/teamspeak3
LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" /opt/teamspeak3/ts3server "$@" &
TS3SERVER_PID=$!
trap 'kill -2 ${TS3SERVER_PID}' INT