This commit is contained in:
Lucas Briese 2018-09-22 21:00:34 +02:00
parent 81741229b2
commit 4da17dc41d
3 changed files with 14 additions and 13 deletions

View File

@ -28,7 +28,8 @@ COPY ["entrypoint.sh", "installAndMountAddons.sh", "forceWorkshopDownload.sh", "
# removed dep. lib32gcc1 libtcmalloc-minimal4:i386 gdb
RUN dpkg --add-architecture i386 && \
apt-get update -y && \
apt-get install -y wget tar gzip ca-certificates lib32stdc++6 lib32tinfo5 && \
apt-get install -y wget tar gzip ca-certificates lib32stdc++6 lib32tinfo5 \
lib32gcc1 libtcmalloc-minimal4:i386 gdb && \
groupadd -g $GROUP_ID $DOCKER_USER && \
useradd -d /home/steam/ -g $GROUP_ID -u $USER_ID -m $DOCKER_USER && \
chown "$DOCKER_USER:$DOCKER_USER" /home/entrypoint.sh && \
@ -40,8 +41,7 @@ RUN dpkg --add-architecture i386 && \
chmod a=rx /home/experimental.sh && \
ulimit -n 2048 && \
\
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' "/etc/locale.gen" && \
./etc/locale.gen
locale-gen en_US.UTF-8
USER "$USER_ID:$GROUP_ID"

View File

@ -23,28 +23,28 @@ fi
echo "testing steamcmd"
chmod ug=rwx,o= steamcmd.sh
./steamcmd.sh +login anonymous +quit
./steamcmd.sh -noasync +login anonymous +quit
echo "installing / validating ttt"
cd "$STEAM_PATH"
./steamcmd.sh +login anonymous +force_install_dir "$STEAM_PATH/server/" +app_update 4020 validate +quit || \
./steamcmd.sh -noasync +login anonymous +force_install_dir "$STEAM_PATH/server/" +app_update 4020 validate +quit || \
(echo '[error][1] catched => printing stderr.txt:' && \
cat "Steam/logs/stderr.txt" && \
echo '[error][1] <= printed' && \
./steamcmd.sh +login anonymous +force_install_dir "$STEAM_PATH/server/" +app_update 4020 validate +quit) || \
./steamcmd.sh -noasync +login anonymous +force_install_dir "$STEAM_PATH/server/" +app_update 4020 validate +quit) || \
(echo '[error][2] catched => printing stderr.txt:' && \
cat "Steam/logs/stderr.txt" && \
echo '[error][2] <= printed' && \
./steamcmd.sh +login anonymous +force_install_dir "$STEAM_PATH/server/" +app_update 4020 validate +quit)
./steamcmd.sh -noasync +login anonymous +force_install_dir "$STEAM_PATH/server/" +app_update 4020 validate +quit)
echo "processing scripts before start"
echo "experimental.sh"
bash /home/experimental.sh
echo "forceWorkshopDownload.sh"
bash /home/forceWorkshopDownload.sh
echo "installAndMountAddons.sh"
bash /home/installAndMountAddons.sh
#echo "forceWorkshopDownload.sh"
#bash /home/forceWorkshopDownload.sh
#echo "installAndMountAddons.sh"
#bash /home/installAndMountAddons.sh
if [ -e "$SERVER_PATH/custom.sh" ]; then
@ -59,7 +59,6 @@ cd "$STEAM_PATH/server/"
trap 'pkill -15 srcds_run' SIGTERM
if [ "$DEBUG_MODE" != "true" ]; then
chmod ug=rwx,o= srcds_run
./srcds_run -console -game garrysmod +gamemode terrortown "$@" &
wait "$!"
else

View File

@ -3,8 +3,10 @@
set -e
#create default server.config
#TODO || [ cat "${SERVER_PATH}/garrysmod/cfg/server.cfg" ] check if empty (only whitespaces)
#TODO don't miss to change to master!
if [ ! -e "${SERVER_PATH}/garrysmod/cfg/server.cfg" ]; then
# not empty: grep -q '[^[:space:]]' < 'server.cfg' && echo "not empty"
if [ ! -e "${SERVER_PATH}/garrysmod/cfg/server.cfg" ] || [ "0" = "$(grep -o '[^[:space:]]' "${SERVER_PATH}/garrysmod/cfg/server.cfg" | wc -l)" ]; then
mkdir -p "${SERVER_PATH}/garrysmod/cfg"
wget -O "${SERVER_PATH}/garrysmod/cfg/server.cfg" "https://raw.githubusercontent.com/jusito/docker-ttt/develop/server.cfg"
fi