From 6f22c386fd494aaa18197f35b733502911f3d4f6 Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Sun, 6 Oct 2024 22:22:29 -0400 Subject: [PATCH] chore: Bump keepup, add prefixes to all script outputs --- .gitignore | 1 + Dockerfile | 6 +++--- scripts/dev/ansible | 8 +++++--- scripts/dev/download_server | 2 +- scripts/dev/entrypoint | 2 +- scripts/dev/keepup | 10 +++++----- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 485dee6..e60ec01 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea +override diff --git a/Dockerfile b/Dockerfile index 412924b..973c819 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,11 @@ # Minimum Panel Version: 0.6.0 # ---------------------------------- FROM alpine as helper -ARG KEEPUP_VERSION='3.0.0-alpha.3' -RUN wget -nv -q -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-shadow-${KEEPUP_VERSION}.zip \ +ARG KEEPUP_VERSION='3.1.0-alpha.3' +RUN wget -nv -q -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-${KEEPUP_VERSION}.zip \ # unzip file inside hocon-to-json.zip into /usr/local \ && unzip -q keepup.zip \ - && mv keepup-shadow-${KEEPUP_VERSION}/ keepup + && mv keepup-${KEEPUP_VERSION}/ keepup # Install YourKit Java Profiler agents #RUN wget -q https://www.yourkit.com/download/docker/YourKit-JavaProfiler-2023.9-docker.zip -P /tmp/ && \ # unzip /tmp/YourKit-JavaProfiler-2023.9-docker.zip -d /usr/local && \ diff --git a/scripts/dev/ansible b/scripts/dev/ansible index 7a0b45f..6a1d4d2 100644 --- a/scripts/dev/ansible +++ b/scripts/dev/ansible @@ -1,16 +1,18 @@ #!/bin/sh set -e +PREFIX="[Init]" + if [ "$ANSIBLE" = "true" ]; then if [ "$ANSIBLE_PULL" = "true" ]; then - echo "Pulling and running latest server config ansible playbook" + echo "$PREFIX Pulling and running latest server config ansible playbook" ansible-pull -U "https://github.com/MineInAbyss/server-config.git" -d "/server-config" --checkout "${ANSIBLE_PULL_BRANCH:=master}" elif [ -f "/server-config/local.yml" ]; then - echo "Running local server config ansible playbook" + echo "$PREFIX Running local server config ansible playbook" ansible-playbook /server-config/local.yml --extra-vars "server_name=$SERVER_NAME dest=/data" fi else - echo "ANSIBLE not set to 'true', not running playbook" + echo "$PREFIX ANSIBLE not set to 'true', not running playbook" fi diff --git a/scripts/dev/download_server b/scripts/dev/download_server index 9aee6a4..9406250 100644 --- a/scripts/dev/download_server +++ b/scripts/dev/download_server @@ -1,7 +1,7 @@ #!/bin/sh set -e -PREFIX="[Download Server]" +PREFIX="[Init]" if [ "$CUSTOM_SERVER_REPO" ]; then [ ! "$CUSTOM_SERVER" ] && export CUSTOM_SERVER=./server.jar diff --git a/scripts/dev/entrypoint b/scripts/dev/entrypoint index 77727d7..f669703 100644 --- a/scripts/dev/entrypoint +++ b/scripts/dev/entrypoint @@ -7,7 +7,7 @@ set -e . /scripts/dev/download_server if [ "$UPDATE_DATA_OWNER" = "true" ]; then - echo "Updating owner for /data to $UID:$GID" + echo "[Init] Updating owner for /data to $UID:$GID" chown $UID:$GID -R /data fi diff --git a/scripts/dev/keepup b/scripts/dev/keepup index c278a24..39f8167 100644 --- a/scripts/dev/keepup +++ b/scripts/dev/keepup @@ -7,7 +7,7 @@ keepupDownloadsDir=$keepupDir/downloads pluginsDir=$HOME/plugins configSource=/server-config/ pluginVersionsFile=/server-config/keepup/plugins.conf - +PREFIX="[Init]" mkdir -p "$keepupDir" mkdir -p "$keepupDownloadsDir" mkdir -p "$pluginsDir" @@ -19,7 +19,7 @@ if [ "$KEEPUP" = "true" ]; then # fi if [ ! -f "$pluginVersionsFile" ]; then - echo "Plugin versions file not found at $pluginVersionsFile, skipping keepup" + echo "$PREFIX Plugin versions file not found at $pluginVersionsFile, skipping keepup" return fi @@ -27,9 +27,9 @@ if [ "$KEEPUP" = "true" ]; then export KEEPUP_JSON_PATH=mineinabyss.servers.${SERVER_NAME} fi - echo "Keepup enabled" - keepup plugins $pluginVersionsFile $keepupDownloadsDir $pluginsDir --hide-progress-bar \ + echo "$PREFIX Keepup enabled" + keepup plugins --hide-progress-bar --ignore-similar $pluginVersionsFile $keepupDownloadsDir $pluginsDir \ config --source $configSource --dest $HOME --inventory $keepupDir/keepup-configs.yml --template-cache $keepupDir/templates ${SERVER_NAME} else - echo "KEEPUP is not set to 'true', not running keepup" + echo "$PREFIX KEEPUP is not set to 'true', not running keepup" fi