Skip to content

Commit

Permalink
fix: correctly link backups and dynmap
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger committed Jan 28, 2024
1 parent e456b31 commit 991801b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker/Dockerfile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ RUN apt-get update && \

ENV MINECRAFT_LEVEL_TYPE DEFAULT

COPY ./overlay/ /
COPY ./mods /usr/share/minecraft/mods
COPY ./config /usr/share/minecraft/config
1 change: 1 addition & 0 deletions docker/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ RUN apt-get update && \

ENV MINECRAFT_LEVEL_TYPE DEFAULT

COPY ./overlay/ /
COPY ./mods /usr/share/minecraft/mods
COPY ./config /usr/share/minecraft/config
10 changes: 10 additions & 0 deletions overlay/etc/container.d/25-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,14 @@ if [ ! -L ${MINECRAFT_GAME_DIR}/backups ]; then
ln -sf ${MINECRAFT_BACKUPS_DIR} ${MINECRAFT_GAME_DIR}/backups
fi

if [ ! -d ${MINECRAFT_DYNMAP_DIR} ]; then
echo "> creating dynmap dir"
mkdir -p ${MINECRAFT_DYNMAP_DIR}
fi

if [ ! -L ${MINECRAFT_GAME_DIR}/dynmap ]; then
echo "> creating dynmap symlink"
ln -sf ${MINECRAFT_DYNMAP_DIR} ${MINECRAFT_GAME_DIR}/dynmap
fi

true
3 changes: 3 additions & 0 deletions overlay/etc/entrypoint.d/20-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
declare -x MINECRAFT_BACKUPS_DIR
[[ -z "${MINECRAFT_BACKUPS_DIR}" ]] && MINECRAFT_BACKUPS_DIR="${MINECRAFT_DATA_DIR}/backups"

declare -x MINECRAFT_DYNMAP_DIR
[[ -z "${MINECRAFT_DYNMAP_DIR}" ]] && MINECRAFT_DYNMAP_DIR="${MINECRAFT_DATA_DIR}/dynmap"

true

0 comments on commit 991801b

Please sign in to comment.