Skip to content

Commit

Permalink
feat: ✨ Add run and build time check for $GAME
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Jun 13, 2024
1 parent d607b9c commit f31f7a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM ubuntu:18.04

ARG GAME

RUN if [ -z "$GAME" ]; then echo "The GAME environment variable is not set. Please specify one and try again." && exit 1; fi

RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y --no-install-recommends curl file libc6:i386 lib32stdc++6 ca-certificates rsync && \
Expand Down
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#!/usr/bin/env sh

if [ -z "$GAME" ]; then
echo "The GAME environment variable is not set. Script execution cancelled."
exit 1
fi

if [ -d /temp/hlds ]
then
rsync --chown=steam:steam /temp/hlds/* /opt/steam/hlds/$GAME
fi



echo Starting Half-Life Dedicated Server...

./hlds_run "-game $GAME $@"

0 comments on commit f31f7a3

Please sign in to comment.