Skip to content

Commit

Permalink
chore: Bump keepup, add prefixes to all script outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Oct 7, 2024
1 parent 613079d commit 6f22c38
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
override
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
8 changes: 5 additions & 3 deletions scripts/dev/ansible
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/dev/download_server
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/dev/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions scripts/dev/keepup
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -19,17 +19,17 @@ 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

if [ -z "$KEEPUP_JSON_PATH" ]; 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

0 comments on commit 6f22c38

Please sign in to comment.