diff --git a/scripts/start.sh b/scripts/start.sh index 5b07f5421..87fb9f9a1 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -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*****" @@ -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