fix: simpler server CLI tool usage

This commit is contained in:
Emmanuel BENOîT 2025-01-03 23:35:45 +01:00
parent df7df838cf
commit 18602a42f1
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg

View file

@ -7,7 +7,7 @@ run_init_command() {
shift
if ! [ -f state/init-$stage ]; then
echo "Running initialization stage $stage"
echo " --> $@"
echo " --> $*"
if /app/entrypoint.sh tool "$*"
then
touch state/init-$stage
@ -53,10 +53,12 @@ if [ "$cmd" == server ]; then
elif [ "$cmd" == shell ]; then
exec /bin/sh
elif [ "$cmd" == tool ]; then
tool="$1"
shift
exec /usr/bin/java \
-Dlog4j.configuration=log4j.properties \
-jar server.jar \
--run-tool "$@"
--run-tool "$tool" "$*"
else
echo "Invalid command '$cmd'" >&2
exit 1