Browse Source

tweakes

pull/5/head
Daniel Gibbs 2 years ago
parent
commit
96b4e576a8
  1. 4
      Dockerfile
  2. 7
      entrypoint.sh

4
Dockerfile

@ -12,7 +12,7 @@ ENV DEBIAN_FRONTEND noninteractive
ENV TERM=xterm
ENV LGSM_GITHUBUSER=GameServerManagers
ENV LGSM_GITHUBREPO=LinuxGSM
ENV LGSM_GITHUBBRANCH=develop
ENV LGSM_GITHUBBRANCH=master
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
## Install Base LinuxGSM Requirements
@ -108,5 +108,3 @@ RUN (crontab -l 2>/dev/null; echo "*/30 * * * * /linuxgsm/*server update > /dev/
RUN rm -f /linuxgsm/entrypoint.sh
COPY entrypoint.sh /linuxgsm/entrypoint.sh
RUN date > /time.txt
ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "bash","./entrypoint.sh" ]

7
entrypoint.sh

@ -1,10 +1,9 @@
#!/bin/bash
exit_handler() {
# Execute the shutdown commands
# Execute the shutdown commands
echo "recieved SIGTERM stopping ${GAMESERVER}"
./${GAMESERVER} stop
exit 0
}
# Exit trap
@ -12,7 +11,7 @@ echo "loading exit trap"
trap exit_handler SIGTERM
echo -e ""
echo -e "Welcome to the DockerGSM"
echo -e "Welcome to the LinuxGSM"
echo -e "================================================================================"
echo -e "TIME: $(date)"
echo -e "SCRIPT TIME: $(cat /time.txt)"
@ -38,6 +37,7 @@ cd /linuxgsm || exit
# Setup game server
if [ ! -f "${GAMESERVER}" ]; then
echo ""
echo "creating ./${GAMESERVER}"
./linuxgsm.sh ${GAMESERVER}
fi
@ -49,6 +49,7 @@ fi
# Install game server
if [ -z "$(ls -A -- "serverfiles")" ]; then
echo ""
echo "installing ${GAMESERVER}"
./${GAMESERVER} auto-install
fi

Loading…
Cancel
Save