From 123bcd478863cfb66fdd2ef65235c42519a6203c Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Tue, 30 Jul 2024 15:40:13 -0400 Subject: [PATCH] feat: Add support for getting latest server via wget with timestamping --- scripts/dev/download_server | 10 ++++++++++ scripts/dev/entrypoint | 1 + 2 files changed, 11 insertions(+) create mode 100644 scripts/dev/download_server diff --git a/scripts/dev/download_server b/scripts/dev/download_server new file mode 100644 index 0000000..97f6efb --- /dev/null +++ b/scripts/dev/download_server @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +if [ "$CUSTOM_SERVER_URL" ]; then + if [ ! "$CUSTOM_SERVER" ]; then + export CUSTOM_SERVER=server.jar + fi + echo "Checking for server updates from $CUSTOM_SERVER_URL" + wget -N -q --show-progress "$CUSTOM_SERVER_URL" -c --output-document="$CUSTOM_SERVER" +fi diff --git a/scripts/dev/entrypoint b/scripts/dev/entrypoint index 0a22125..77727d7 100644 --- a/scripts/dev/entrypoint +++ b/scripts/dev/entrypoint @@ -4,6 +4,7 @@ set -e . /scripts/dev/ansible . /scripts/dev/keepup +. /scripts/dev/download_server if [ "$UPDATE_DATA_OWNER" = "true" ]; then echo "Updating owner for /data to $UID:$GID"