Skip to content

Commit b14e76c

Browse files
committed
Support passing in LGSM command to run
1 parent dc733f7 commit b14e76c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

entrypoint-user.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ elif [ -d "/app/lgsm/modules" ]; then
3030
chmod +x /app/lgsm/modules/*
3131
fi
3232

33+
# If a command was passed in, run it and exit
34+
if [ "$1" != "" ]; then
35+
echo -e "Running $1"
36+
./"${GAMESERVER}" "$1"
37+
exit 0
38+
fi
39+
3340
# Install game server
3441
if [ -z "$(ls -A -- "/data/serverfiles" 2> /dev/null)" ]; then
3542
echo -e ""

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ export HOME=/data
6363
echo -e ""
6464
echo -e "Switch to user ${USER}"
6565
echo -e "================================="
66-
exec gosu "${USER}" /app/entrypoint-user.sh &
66+
exec gosu "${USER}" /app/entrypoint-user.sh "$@" &
6767
wait

0 commit comments

Comments
 (0)