From 3c91314b495d29ca04e1212a2238b8238277ea66 Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Fri, 25 Mar 2022 19:51:57 -0700 Subject: [PATCH] Add missing lib. Remove other packages that won't be used in docker. Add more reporting when the server crashes. WIP. --- Dockerfile | 5 ++--- server.sh | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6335bb7..7b72abb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,19 +9,18 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # Add contrib and backports RUN sed -i /etc/apt/sources.list -e 's/main/main contrib/' -RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list +#RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list # Add 32 bit arch for steam crap RUN dpkg --add-architecture i386 # Install necessary packages RUN apt-get update && apt-get -y upgrade && apt-get -y install \ - tmux \ nano \ - htop \ curl \ lib32gcc-s1 \ lib32stdc++6 \ + libcap2 \ locales \ psmisc \ wget \ diff --git a/server.sh b/server.sh index 9da48fe..8dfa3f5 100755 --- a/server.sh +++ b/server.sh @@ -6,11 +6,16 @@ ulimit -c 0 # This script will take environment variables and put them into the files the script expects. echo "steamlogin=anonymous" > .steamlogin -# Do something with SERVERNAME="DayZ on Linux for Linux" -if ! grep SERVERNAME serverDZ.cfg -then - echo "Setting the SERVERNAME..." - sed -i serverDZ.cfg -e "s/SERVERNAME/${SERVERNAME}/" -fi +sed -i serverDZ.cfg -e "s/SERVERNAME/${SERVERNAME}/" -./dayzserver start || find /home/user -name error.log -exec cat {} \; \ No newline at end of file +./dayzserver start || ( + echo + echo "========================================== error.log ==========================================" + find /home/user -name error.log -exec cat {} \; -exec rm -f {} \; + echo + echo "========================================== script*.log ==========================================" + find /home/user -name "script*.log" -exec cat {} \; -exec rm -f {} \; + echo + echo "========================================== *.RPT ==========================================" +find /home/user -name "*.RPT" -exec cat {} \; -exec rm -f {} \; +) \ No newline at end of file