Skip to content

Commit

Permalink
Merge branch 'thijsvanloef:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
win5923 authored Feb 1, 2024
2 parents 813487b + 25d5ede commit 910e85f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
This is a Docker container to help you get started with hosting your own
[Palworld](https://store.steampowered.com/app/1623730/Palworld/) dedicated server.

This Docker container has been tested and will work on both Linux (Ubuntu/Debian) and Windows 10.
This Docker container has been tested and will work on Linux (Ubuntu/Debian), Windows 10 and macOS (including Apple Silicon).

> [!IMPORTANT]
> At the moment, Xbox GamePass/Xbox Console players will not be able to join a dedicated server.
Expand Down
2 changes: 1 addition & 1 deletion docs/kr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[Palworld](https://store.steampowered.com/app/1623730/Palworld/) 전용 서버 호스팅을 시작하는 데 도움이 되는 Docker 컨테이너입니다.

이 도커 컨테이너는 테스트되었으며 Linux(Ubuntu/Debian)Windows 10 모두에서 작동합니다.
이 도커 컨테이너는 테스트되었으며 Linux(Ubuntu/Debian), Windows 10 및 macOS (Apple Silicon 포함) 모두에서 작동합니다.

> [!Important]
> 현재 Xbox Gamepass/Xbox 콘솔 플레이어는 전용 서버에 참여할 수 없습니다.
Expand Down
1 change: 1 addition & 0 deletions scripts/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ DATE=$(date +"%Y-%m-%d_%H-%M-%S")
FILE_PATH="/palworld/backups/palworld-save-${DATE}.tar.gz"
cd /palworld/Pal/ || exit

echo "Creating backup"
tar -zcf "$FILE_PATH" "Saved/"

if [ "$(id -u)" -eq 0 ]; then
Expand Down
12 changes: 10 additions & 2 deletions scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ term_handler() {
else # Does not save
kill -SIGTERM "$(pidof PalServer-Linux-Test)"
fi
tail --pid=$killpid -f 2>/dev/null
tail --pid="$killpid" -f 2>/dev/null
}

trap 'term_handler' SIGTERM

su steam -c ./start.sh &
# Process ID of su
killpid="$!"
wait $killpid
wait "$killpid"

mapfile -t backup_pids < <(pgrep backup)
if [ "${#backup_pids[@]}" -ne 0 ]; then
echo "Waiting for backup to finish"
for pid in "${backup_pids[@]}"; do
tail --pid="$pid" -f 2>/dev/null
done
fi

0 comments on commit 910e85f

Please sign in to comment.