Skip to content

Commit

Permalink
Merge pull request #519 from loef-dev/api-config
Browse files Browse the repository at this point in the history
Fixes for update 0.2.0.6
  • Loading branch information
thijsvanloef committed Apr 4, 2024
2 parents 722f593 + 7693ff7 commit 90750a7
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 6 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,13 @@ It is highly recommended you set the following environment values before startin
| UPDATE_ON_BOOT** | Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER) | true | true/false |
| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false |
| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 |
| REST_API_ENABLED | Enable REST API for the palworld server | false | true/false |
| REST_API_PORT | REST API port to connect to | 8212 | 1024-65535 |
| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 |
| ALLOW_CONNECT_PLATFORM | !!Doesn't work this version!! | Steam | unknown |
| BACKUP_CRON_EXPRESSION | Setting affects frequency of automatic backups. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](#configuring-automatic-backups-with-cron) |
| BACKUP_ENABLED | Enables automatic backups | true | true/false |
| USE_BACKUP_SAVE_DATA | Enables native automatic backups | true | true/false |
| DELETE_OLD_BACKUPS | Delete backups after a certain number of days | false | true/false |
| OLD_BACKUP_DAYS | How many days to keep backups | 30 | any positive integer |
| AUTO_UPDATE_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 \* \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](#configuring-automatic-backups-with-cron) |
Expand Down Expand Up @@ -577,6 +581,7 @@ The manifest corresponds to the release date/update versions. Manifests can be f
| 1.4.1 | 6370735655629434989 |
| 1.5.0 | 3750364703337203431 |
| 1.5.1 | 2815085007637542021 |
| 2.0.6 | 1677469329840659324 |
## Reporting Issues/Feature Requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ It is highly recommended you set the following environment values before startin
| UPDATE_ON_BOOT** | Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER) | true | true/false |
| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false |
| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 |
| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 |
| REST_API_ENABLED | Enable REST API for the palworld server | false | true/false |
| REST_API_PORT | REST API port to connect to | 8212 | 1024-65535 |
| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 |
| ALLOW_CONNECT_PLATFORM | !!Doesn't work this version!! | Steam | unknown |
| BACKUP_CRON_EXPRESSION | Setting affects frequency of automatic backups. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](https://palworld-server-docker.loef.dev/guides/backup/automated-backup) |
| BACKUP_ENABLED | Enables automatic backups | true | true/false |
| DELETE_OLD_BACKUPS | Delete backups after a certain number of days | false | true/false |
Expand Down
1 change: 1 addition & 0 deletions docusaurus/docs/guides/pinning-game-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ The manifest corresponds to the release date/update versions. Manifests can be f
| 1.4.1 | 6370735655629434989 |
| 1.5.0 | 3750364703337203431 |
| 1.5.1 | 2815085007637542021 |
| 2.0.6 | 1677469329840659324 |
8 changes: 8 additions & 0 deletions scripts/compile-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export RCON_PORT=${RCON_PORT:-25575}
export REGION=\"${REGION:-""}\"
export USEAUTH=${USEAUTH:-True}
export BAN_LIST_URL=\"${BAN_LIST_URL:-https://api.palworldgame.com/api/banlist.txt}\"
export REST_API_ENABLED=\"${REST_API_ENABLED:-False}\"
export REST_API_PORT=\"${REST_API_PORT:-8212}\"
export SHOW_PLAYER_LIST=${SHOW_PLAYER_LIST:-True}
export ALLOW_CONNECT_PLATFORM=${ALLOW_CONNECT_PLATFORM:-"Steam"}
export USE_BACKUP_SAVE_DATA=${USE_BACKUP_SAVE_DATA:-True}

if [ "${DEBUG,,}" = true ]; then
cat <<EOF
Expand Down Expand Up @@ -150,7 +154,11 @@ RCON_PORT = $RCON_PORT
REGION = $REGION
USEAUTH = $USEAUTH
BAN_LIST_URL = $BAN_LIST_URL
REST_API_ENABLED = $REST_API_ENABLED
REST_API_PORT = $REST_API_PORT
SHOW_PLAYER_LIST = $SHOW_PLAYER_LIST
ALLOW_CONNECT_PLATFORM = $ALLOW_CONNECT_PLATFORM
USE_BACKUP_SAVE_DATA = $USE_BACKUP_SAVE_DATA
====Debug====
EOF
fi
Expand Down
6 changes: 5 additions & 1 deletion scripts/files/PalWorldSettings.ini.template
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,9 @@ RCONPort=$RCON_PORT,
Region=$REGION,
bUseAuth=$USEAUTH,
BanListURL=$BAN_LIST_URL,
bShowPlayerList=$SHOW_PLAYER_LIST
RESTAPIEnabled=$REST_API_ENABLED,
RESTAPIPort=$REST_API_PORT,
bShowPlayerList=$SHOW_PLAYER_LIST,
AllowConnectPlatform=$ALLOW_CONNECT_PLATFORM,
bIsUseBackupSaveData=$USE_BACKUP_SAVE_DATA,
)
2 changes: 1 addition & 1 deletion scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ term_handler() {

if ! shutdown_server; then
# Does not save
kill -SIGTERM "$(pidof PalServer-Linux-Test)"
kill -SIGTERM "$(pidof PalServer-Linux-Shipping)"
fi

tail --pid="$killpid" -f 2>/dev/null
Expand Down
2 changes: 1 addition & 1 deletion scripts/player_logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ while ! nc -z 127.0.0.1 "${RCON_PORT}"; do
done

while true; do
server_pid=$(pidof PalServer-Linux-Test)
server_pid=$(pidof PalServer-Linux-Shipping)
if [ -n "${server_pid}" ]; then
# Player IDs are usally 9 or 10 digits however when a player joins for the first time for a given boot their ID is temporary 00000000 (8x zeros) while loading
# Player ID is also 00000000 (8x zeros) when in character creation
Expand Down
2 changes: 1 addition & 1 deletion scripts/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if [ -f "$BACKUP_FILE" ]; then
exit 1
fi

server_pid=$(pidof PalServer-Linux-Test)
server_pid=$(pidof PalServer-Linux-Shipping)
if [ -n "${server_pid}" ]; then
LogInfo "Waiting for Palworld to exit.."
tail --pid="${server_pid}" -f /dev/null
Expand Down
2 changes: 1 addition & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if [ "$architecture" == "arm64" ]; then
;;
esac

sed -i "s|\(\"\$UE_PROJECT_ROOT\/Pal\/Binaries\/Linux\/PalServer-Linux-Test\" Pal \"\$@\"\)|LD_LIBRARY_PATH=/home/steam/steamcmd/linux64:\$LD_LIBRARY_PATH $box64_binary \1|" ./PalServer-arm64.sh
sed -i "s|\(\"\$UE_PROJECT_ROOT\/Pal\/Binaries\/Linux\/PalServer-Linux-Shipping\" Pal \"\$@\"\)|LD_LIBRARY_PATH=/home/steam/steamcmd/linux64:\$LD_LIBRARY_PATH $box64_binary \1|" ./PalServer-arm64.sh
chmod +x ./PalServer-arm64.sh
STARTCOMMAND=("./PalServer-arm64.sh")
else
Expand Down

0 comments on commit 90750a7

Please sign in to comment.