Skip to content

Commit

Permalink
Support passing in LGSM command to run
Browse files Browse the repository at this point in the history
  • Loading branch information
joshhsoj1902 committed Oct 8, 2023
1 parent dc733f7 commit 50cacd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions entrypoint-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ elif [ -d "/app/lgsm/modules" ]; then
chmod +x /app/lgsm/modules/*
fi

# If a command was passed in, run it and exit
if [ "$1" != "" ]; then
echo "Running $1"
./"${GAMESERVER}" $1
exit 0
fi

# Install game server
if [ -z "$(ls -A -- "/data/serverfiles" 2> /dev/null)" ]; then
echo -e ""
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ export HOME=/data
echo -e ""
echo -e "Switch to user ${USER}"
echo -e "================================="
exec gosu "${USER}" /app/entrypoint-user.sh &
exec gosu "${USER}" /app/entrypoint-user.sh $@ &
wait

0 comments on commit 50cacd0

Please sign in to comment.