mirror of
https://github.com/luzifer-docker/teamspeak3.git
synced 2024-12-20 14:41:17 +00:00
Reformat scripts, remove unknown options
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
d96da5143a
commit
f185d6841a
2 changed files with 38 additions and 31 deletions
11
Dockerfile
11
Dockerfile
|
@ -7,13 +7,20 @@ ENV TEAMSPEAK_VERSION=3.13.7 \
|
||||||
TEAMSPEAK_SHA256=775a5731a9809801e4c8f9066cd9bc562a1b368553139c1249f2a0740d50041e
|
TEAMSPEAK_SHA256=775a5731a9809801e4c8f9066cd9bc562a1b368553139c1249f2a0740d50041e
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y curl bzip2 ca-certificates dumb-init --no-install-recommends \
|
&& apt-get install --no-install-recommends -y \
|
||||||
|
bzip2 \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
dumb-init \
|
||||||
&& curl -sSfLo teamspeak3-server_linux-amd64.tar.bz2 \
|
&& curl -sSfLo teamspeak3-server_linux-amd64.tar.bz2 \
|
||||||
"https://files.teamspeak-services.com/releases/server/${TEAMSPEAK_VERSION}/teamspeak3-server_linux_amd64-${TEAMSPEAK_VERSION}.tar.bz2" \
|
"https://files.teamspeak-services.com/releases/server/${TEAMSPEAK_VERSION}/teamspeak3-server_linux_amd64-${TEAMSPEAK_VERSION}.tar.bz2" \
|
||||||
&& echo "${TEAMSPEAK_SHA256} *teamspeak3-server_linux-amd64.tar.bz2" | sha256sum -c - \
|
&& echo "${TEAMSPEAK_SHA256} *teamspeak3-server_linux-amd64.tar.bz2" | sha256sum -c - \
|
||||||
&& tar -C /opt -xjf teamspeak3-server_linux-amd64.tar.bz2 \
|
&& tar -C /opt -xjf teamspeak3-server_linux-amd64.tar.bz2 \
|
||||||
&& rm teamspeak3-server_linux-amd64.tar.bz2 \
|
&& rm teamspeak3-server_linux-amd64.tar.bz2 \
|
||||||
&& apt-get purge -y curl bzip2 && apt-get autoremove -y \
|
&& apt-get purge -y \
|
||||||
|
bzip2 \
|
||||||
|
curl \
|
||||||
|
&& apt-get autoremove -y \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& groupadd -g 1000 teamspeak \
|
&& groupadd -g 1000 teamspeak \
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
function log() {
|
||||||
|
echo "[$(date +%H:%M:%S)] $@" >&2
|
||||||
|
}
|
||||||
|
|
||||||
VOLUME=/teamspeak3
|
VOLUME=/teamspeak3
|
||||||
|
|
||||||
if [ -e "${VOLUME}/.ts3server_license_accepted" ]; then
|
if [ -e "${VOLUME}/.ts3server_license_accepted" ]; then
|
||||||
echo "- Accepting license as you requested"
|
log "- Accepting license as you requested"
|
||||||
touch /opt/teamspeak3-server_linux_amd64/.ts3server_license_accepted
|
touch /opt/teamspeak3-server_linux_amd64/.ts3server_license_accepted
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "- Linking host mounted database..."
|
|
||||||
|
|
||||||
if ! [ -L /opt/teamspeak3-server_linux_amd64/ts3server.sqlitedb ]; then
|
if ! [ -L /opt/teamspeak3-server_linux_amd64/ts3server.sqlitedb ]; then
|
||||||
ln -s $VOLUME/ts3server.sqlitedb /opt/teamspeak3-server_linux_amd64/ts3server.sqlitedb
|
log "- Linking host mounted database..."
|
||||||
|
ln -s ${VOLUME}/ts3server.sqlitedb /opt/teamspeak3-server_linux_amd64/ts3server.sqlitedb
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "- Link the files-folder into the host-mounted volume..."
|
|
||||||
|
|
||||||
mkdir -p ${VOLUME}/files
|
mkdir -p ${VOLUME}/files
|
||||||
if ! [ -L /opt/teamspeak3-server_linux_amd64/files ]; then
|
if ! [ -L /opt/teamspeak3-server_linux_amd64/files ]; then
|
||||||
|
log "- Link the files-folder into the host-mounted volume..."
|
||||||
rm -rf /opt/teamspeak3-server_linux_amd64/files
|
rm -rf /opt/teamspeak3-server_linux_amd64/files
|
||||||
ln -s ${VOLUME}/files /opt/teamspeak3-server_linux_amd64/files
|
ln -s ${VOLUME}/files /opt/teamspeak3-server_linux_amd64/files
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "- Starting TS3-Server..."
|
log "- Starting TS3-Server..."
|
||||||
if [ -f "${VOLUME}/ts3server.ini" ]; then
|
if [ -f "${VOLUME}/ts3server.ini" ]; then
|
||||||
echo " '${VOLUME}/ts3server.ini' found. Using as config file."
|
log " '${VOLUME}/ts3server.ini' found. Using as config file."
|
||||||
echo " HINT: If this ini was transfered from another ts3-install you may want"
|
log " HINT: If this ini was transfered from another ts3-install you may want"
|
||||||
echo " to make sure the following settings are active for the usage of host-mounted volume:"
|
log " to make sure the following settings are active for the usage of host-mounted volume:"
|
||||||
echo " - query_ip_whitelist='${VOLUME}/query_ip_whitelist.txt'"
|
log " - query_ip_whitelist='${VOLUME}/query_ip_whitelist.txt'"
|
||||||
echo " - query_ip_backlist='${VOLUME}/query_ip_blacklist.txt'"
|
log " - logpath='${VOLUME}/logs/'"
|
||||||
echo " - logpath='${VOLUME}/logs/'"
|
log " - licensepath='${VOLUME}/'"
|
||||||
echo " - licensepath='${VOLUME}/'"
|
log " - inifile='${VOLUME}/ts3server.ini'"
|
||||||
echo " - inifile='${VOLUME}/ts3server.ini'"
|
|
||||||
/opt/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh \
|
/opt/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh \
|
||||||
inifile="${VOLUME}/ts3server.ini"
|
inifile="${VOLUME}/ts3server.ini"
|
||||||
else
|
else
|
||||||
echo " '${VOLUME}/ts3server.ini' not found. Creating new config file."
|
log " '${VOLUME}/ts3server.ini' not found. Creating new config file."
|
||||||
/opt/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh \
|
/opt/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh \
|
||||||
createinifile=1 \
|
createinifile=1 \
|
||||||
inifile="${VOLUME}/ts3server.ini" \
|
inifile="${VOLUME}/ts3server.ini" \
|
||||||
licensepath="${VOLUME}/" \
|
licensepath="${VOLUME}/" \
|
||||||
logpath="${VOLUME}/logs/" \
|
logpath="${VOLUME}/logs/" \
|
||||||
query_ip_backlist="${VOLUME}/query_ip_blacklist.txt" \
|
query_ip_allowlist="${VOLUME}/query_ip_whitelist.txt"
|
||||||
query_ip_whitelist="${VOLUME}/query_ip_whitelist.txt"
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue