Skip to content

Commit

Permalink
Merge branch 'master' of github.com:miguelrjim/docker-palworld-dedica…
Browse files Browse the repository at this point in the history
…ted-server into miguelrjim-master
  • Loading branch information
jammsen committed Jan 25, 2024
2 parents 7f74544 + 3c9315d commit bc346a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ ENV DEBIAN_FRONTEND=noninteractive \
BACKUP_ENABLED=true \
BACKUP_CRON_EXPRESSION="0 * * * *"

USER root

RUN mkdir /palworld
RUN chown steam:steam /palworld

VOLUME [ "/palworld" ]

EXPOSE 8211/udp
Expand All @@ -48,4 +53,6 @@ EXPOSE 25575/tcp
ADD --chmod=777 servermanager.sh /servermanager.sh
ADD --chmod=777 backupmanager.sh /backupmanager.sh

USER steam

CMD ["/servermanager.sh"]
6 changes: 3 additions & 3 deletions servermanager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ GAME_PATH="/palworld"
function installServer() {
# force a fresh install of all
echo ">>> Doing a fresh install of the gameserver"
/home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit
/home/steam/steamcmd/steamcmd.sh +force_install_dir "$GAME_PATH" +login anonymous +app_update 2394010 validate +quit
}

function updateServer() {
# force an update and validation
echo ">>> Doing an update of the gameserver"
/home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit
/home/steam/steamcmd/steamcmd.sh +force_install_dir "$GAME_PATH" +login anonymous +app_update 2394010 validate +quit
}

function startServer() {
Expand Down Expand Up @@ -89,7 +89,7 @@ function startMain() {
/usr/local/bin/supercronic cronlist &
fi
# Check if server is installed, if not try again
if [ ! -f "/palworld/PalServer.sh" ]; then
if [ ! -f "$GAME_PATH/PalServer.sh" ]; then
installServer
fi
if [ $ALWAYS_UPDATE_ON_START == "true" ]; then
Expand Down

0 comments on commit bc346a7

Please sign in to comment.