Skip to content

Commit

Permalink
Merge pull request #318 from sonroyaalmerol/pagesize-checker
Browse files Browse the repository at this point in the history
Add page size checker before running steamcmd for ARM64 images
  • Loading branch information
thijsvanloef authored Feb 8, 2024
2 parents 1b6498c + 7201d30 commit 9bf0d90
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ printf "\e[0;32m*****GENERATING CONFIGS*****\e[0m\n"

cd /palworld || exit

# Get the architecture using dpkg
architecture=$(dpkg --print-architecture)

# Get host kernel page size
kernel_page_size=$(getconf PAGESIZE)

# Check kernel page size for arm64 hosts before running steamcmd
if [ "$architecture" == "arm64" ] && [ "$kernel_page_size" != "4096" ]; then
echo "Only ARM64 hosts with 4k page size is supported."
exit 1
fi

if [ "${UPDATE_ON_BOOT,,}" = true ]; then
printf "\e[0;32m%s\e[0m\n" "*****STARTING INSTALL/UPDATE*****"

Expand All @@ -74,8 +86,6 @@ if [ "${UPDATE_ON_BOOT,,}" = true ]; then
fi
fi

# Get the architecture using dpkg
architecture=$(dpkg --print-architecture)
# Check if the architecture is arm64
if [ "$architecture" == "arm64" ]; then
# create an arm64 version of ./PalServer.sh
Expand Down

0 comments on commit 9bf0d90

Please sign in to comment.