make port and players optional

This commit is contained in:
Thijs van Loef
2024-01-21 20:04:45 +01:00
parent b7fc8d5cc6
commit 625e1c793a
4 changed files with 18 additions and 13 deletions

View File

@@ -1,6 +1,14 @@
#!/bin/bash
STARTCOMMAND="./PalServer.sh -port=${PORT} -players=${PLAYERS}"
STARTCOMMAND="./PalServer.sh"
if [ -n "${PORT}" ]; then
STARTCOMMAND="${STARTCOMMAND} -port=${PORT}"
fi
if [ -n "${PLAYERS}" ]; then
STARTCOMMAND="${STARTCOMMAND} -players=${PLAYERS}"
fi
if [ "${COMMUNITY}" = true ]; then
STARTCOMMAND="${STARTCOMMAND} EpicApp=PalServer"