Files
palworld-server-docker/scripts/init.sh

21 lines
608 B
Bash
Raw Normal View History

#!/bin/bash
2024-01-19 19:35:32 +01:00
if [[ ! "${PUID}" -eq 0 ]] && [[ ! "${PGID}" -eq 0 ]]; then
2024-01-21 16:24:31 +01:00
printf "\e[0;32m*****EXECUTING USERMOD*****\e[0m\n"
usermod -o -u "${PUID}" steam
groupmod -o -g "${PGID}" steam
else
2024-01-21 16:24:31 +01:00
printf "\033[31mRunning as root is not supported, please fix your PUID and PGID!\n"
exit 1
fi
2024-01-19 14:58:51 +01:00
mkdir -p /palworld
2024-01-19 14:58:51 +01:00
chown -R steam:steam /palworld
2024-01-19 19:35:32 +01:00
if [ "${UPDATE_ON_BOOT}" = true ]; then
2024-01-21 16:24:31 +01:00
printf "\e[0;32m*****STARTING INSTALL/UPDATE*****\e[0m\n"
su steam -c '/home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit'
2024-01-19 19:35:32 +01:00
fi
2024-01-19 14:58:51 +01:00
./start.sh