Compare commits

..

78 Commits

Author SHA1 Message Date
Geoff Bourne 885d5a36eb Auto-merging via docker-versions-create 2021-12-13 21:28:54 -06:00
Geoff Bourne 15a4569dc5 Auto-merging via docker-versions-create 2021-12-12 19:52:07 -06:00
Geoff Bourne 9b5bd3787f Merging latest from master 2021-12-12 09:16:19 -06:00
Geoff Bourne a1665bc874 Auto-merging via docker-versions-create 2021-12-11 16:24:47 -06:00
Geoff Bourne b77586a10a Auto-merging via docker-versions-create 2021-12-10 21:04:47 -06:00
Geoff Bourne 9a3f3fc33f Auto-merging via docker-versions-create 2021-12-10 10:42:32 -06:00
Geoff Bourne a88c046d59 Auto-merging via docker-versions-create 2021-12-10 07:57:43 -06:00
Geoff Bourne 871d54f44e Merge latest from master 2021-12-06 22:06:03 -06:00
Geoff Bourne cd59602d40 Auto merge branch with master 2021-12-04 10:00:25 -06:00
Geoff Bourne 793bedcd14 Auto-merging via docker-versions-create 2021-12-04 10:00:24 -06:00
Geoff Bourne 0f94d0aece Auto-merging via docker-versions-create 2021-12-02 19:47:07 -06:00
Geoff Bourne 6ee44b3409 Auto-merging via docker-versions-create 2021-11-24 15:57:54 -06:00
Geoff Bourne faa7553e54 Auto-merging via docker-versions-create 2021-11-24 14:34:41 -06:00
Geoff Bourne 0d85d672ef Track latest from master 2021-11-16 19:02:35 -06:00
Geoff Bourne 0e6c85f25a Auto-merging via docker-versions-create 2021-11-16 18:52:12 -06:00
Geoff Bourne 484417c7a3 Auto-merging via docker-versions-create 2021-11-15 20:48:43 -06:00
Geoff Bourne dc44c328d4 Auto-merging via docker-versions-create 2021-11-13 19:18:11 -06:00
Geoff Bourne 7a4e308e8c Auto-merging via docker-versions-create 2021-11-13 18:52:44 -06:00
Geoff Bourne b267afc0bc Auto-merging via docker-versions-create 2021-11-12 21:24:34 -06:00
Geoff Bourne 13a6b2c44e Auto-merging via docker-versions-create 2021-11-06 21:38:46 -05:00
Geoff Bourne 1db04946df Auto-merging via docker-versions-create 2021-11-04 21:05:23 -05:00
Geoff Bourne c682e4ebf6 Auto-merging via docker-versions-create 2021-10-31 09:46:50 -05:00
Geoff Bourne 5132a662e7 Switched base image to JDK
#1064
2021-10-27 21:26:20 -05:00
Geoff Bourne 79d169cb9a Merge branch 'master' into java11 2021-10-27 21:25:57 -05:00
Geoff Bourne 6950c05ea0 Auto-merging via docker-versions-create 2021-10-25 19:24:29 -05:00
Geoff Bourne 71dc5af9a9 Auto-merging via docker-versions-create 2021-10-24 20:29:00 -05:00
Geoff Bourne 098ba9554e Auto-merging via docker-versions-create 2021-10-23 09:44:17 -05:00
Geoff Bourne c6925eb316 Auto-merging via docker-versions-create 2021-10-22 15:54:57 -05:00
Geoff Bourne 82963e7474 Auto-merging via docker-versions-create 2021-10-18 22:15:02 -05:00
Geoff Bourne 59fde19e3f Auto-merging via docker-versions-create 2021-10-17 14:53:37 -05:00
Geoff Bourne 63c5acfe49 Auto-merging via docker-versions-create 2021-10-15 18:58:11 -05:00
Geoff Bourne 1f1fa02031 Auto-merging via docker-versions-create 2021-10-15 18:48:40 -05:00
Geoff Bourne 250ce7849b Auto-merging via docker-versions-create 2021-10-10 09:57:18 -05:00
Geoff Bourne c6587a115c Auto-merging via docker-versions-create 2021-10-09 15:26:23 -05:00
Geoff Bourne a2ce3a7437 Auto-merging via docker-versions-create 2021-10-09 12:05:03 -05:00
Geoff Bourne 80cad3572d Auto-merging via docker-versions-create 2021-10-02 19:23:05 -05:00
Geoff Bourne 9a2eb0042f Auto-merging via docker-versions-create 2021-09-29 10:26:59 -05:00
Geoff Bourne 559745dd80 Auto-merging via docker-versions-create 2021-09-27 20:41:53 -05:00
Geoff Bourne a3972d83bb Auto-merging via docker-versions-create 2021-09-20 12:31:17 -05:00
Geoff Bourne baf7cdd7e2 Auto-merging via docker-versions-create 2021-09-15 21:31:47 -05:00
Geoff Bourne f24096e584 Auto-merging via docker-versions-create 2021-09-15 21:07:40 -05:00
Geoff Bourne d39f3b0afc Auto-merging via docker-versions-create 2021-09-15 20:37:38 -05:00
Geoff Bourne add67113ff Auto-merging via docker-versions-create 2021-08-30 21:38:08 -05:00
Geoff Bourne fe67ee5c79 Auto-merging via docker-versions-create 2021-08-10 12:56:42 -05:00
Geoff Bourne 5b777eff5b Auto-merging via docker-versions-create 2021-08-01 12:13:34 -05:00
Geoff Bourne f36dd34f72 Auto-merging via docker-versions-create 2021-07-31 09:28:04 -05:00
Geoff Bourne c4fa657c61 Auto-merging via docker-versions-create 2021-07-26 19:36:01 -05:00
Geoff Bourne bfb0d19372 Merge branch 'master' into java11 2021-07-25 18:20:51 -05:00
Geoff Bourne bef6e7b432 Auto-merging via docker-versions-create 2021-07-25 09:37:18 -05:00
Geoff Bourne 3263a23140 Auto-merging via docker-versions-create 2021-07-23 21:28:09 -05:00
Geoff Bourne 8163e266fe Auto-merging via docker-versions-create 2021-07-17 21:15:14 -05:00
Geoff Bourne 349f27f345 Auto-merging via docker-versions-create 2021-07-17 20:57:59 -05:00
Geoff Bourne 9b6b813fe8 Auto-merging via docker-versions-create 2021-07-17 18:04:38 -05:00
Geoff Bourne 1f39283fd0 Auto-merging via docker-versions-create 2021-07-14 18:43:19 -05:00
Geoff Bourne 2086562d03 Auto-merging via docker-versions-create 2021-07-12 19:10:15 -05:00
Geoff Bourne 67404c017a Auto-merging via docker-versions-create 2021-07-09 19:58:58 -05:00
Geoff Bourne 41e97454a9 Auto-merging via docker-versions-create 2021-07-08 18:00:07 -05:00
Geoff Bourne 31d082574d Auto-merging via docker-versions-create 2021-07-08 08:04:19 -05:00
itzg 0f59ec97b7 Auto-merging via docker-versions-create 2021-07-08 12:56:03 +00:00
Geoff Bourne a1ce1b5a24 Auto-merging via docker-versions-create 2021-07-08 07:39:17 -05:00
itzg fb3504ec1a Auto-merging via docker-versions-create 2021-07-04 19:54:04 +00:00
Geoff Bourne b75f83cbf1 Auto-merging via docker-versions-create 2021-07-03 14:24:32 -05:00
Geoff Bourne dc5192e2e7 ci: auto-merge from master 2021-07-02 15:59:12 -05:00
itzg 76b5ec75cc Auto-merging via docker-versions-create 2021-07-02 16:55:58 +00:00
itzg 4663723b84 Auto-merging via docker-versions-create 2021-06-28 12:14:08 +00:00
itzg 2acb45dc62 Auto-merging via docker-versions-create 2021-06-27 13:13:14 +00:00
itzg de42f62031 Auto-merging via docker-versions-create 2021-06-24 12:47:08 +00:00
Geoff Bourne 7e690849b6 Auto-merging via docker-versions-create 2021-06-23 22:34:21 -05:00
Geoff Bourne 0a1c00f701 Auto-merging via docker-versions-create 2021-06-20 12:49:10 -05:00
Geoff Bourne dc8c9e5d1a Auto-merging via docker-versions-create 2021-06-05 17:52:23 -05:00
Geoff Bourne 9577c84d6a Auto-merging via docker-versions-create 2021-05-24 20:51:26 -05:00
Geoff Bourne 575197a109 Merge branch 'master' into java11 2021-05-23 12:27:03 -05:00
Geoff Bourne 2b621b8236 Merge from master 2021-05-22 13:45:56 -05:00
Geoff Bourne 14d3446f52 Auto-merging via docker-versions-create 2021-05-21 23:02:26 -05:00
Geoff Bourne 83a7481027 Auto-merging via docker-versions-create 2021-05-21 22:50:35 -05:00
Geoff Bourne 4c3a329e31 ci: adjusted CACHE_NAME 2021-05-21 17:34:05 -05:00
Geoff Bourne 6c94e49732 ci: updated java11 Dockerfile 2021-05-21 17:33:26 -05:00
Geoff Bourne af77b29509 ci: add java11 to build/merge 2021-05-21 17:32:38 -05:00
15 changed files with 27 additions and 291 deletions
-4
View File
@@ -1,4 +0,0 @@
changelog:
exclude:
authors:
- dependabot
+1 -1
View File
@@ -81,7 +81,7 @@ jobs:
uses: docker/build-push-action@v2.7.0
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
# ensure latest base image is used
+3 -5
View File
@@ -1,4 +1,4 @@
FROM adoptopenjdk:8-jdk-openj9
FROM adoptopenjdk:11-jdk
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
@@ -76,8 +76,7 @@ ENV UID=1000 GID=1000 \
TYPE=VANILLA VERSION=LATEST \
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0 \
ENABLE_AUTOSTOP=false AUTOSTOP_TIMEOUT_EST=3600 AUTOSTOP_TIMEOUT_INIT=1800 AUTOSTOP_PERIOD=10
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0
COPY --chmod=755 scripts/start* /
COPY --chmod=755 bin/ /usr/local/bin/
@@ -85,9 +84,8 @@ COPY --chmod=755 bin/mc-health /health.sh
COPY --chmod=644 files/server.properties /tmp/server.properties
COPY --chmod=644 files/log4j2.xml /tmp/log4j2.xml
COPY --chmod=755 files/autopause /autopause
COPY --chmod=755 files/autostop /autostop
RUN dos2unix /start* /autopause/* /autostop/*
RUN dos2unix /start* /autopause/*
ENTRYPOINT [ "/start" ]
HEALTHCHECK --start-period=1m CMD mc-health
+2 -36
View File
@@ -73,7 +73,6 @@ By default, the container will download the latest version of the "vanilla" [Min
* [Downloadable world](#downloadable-world)
* [Cloning world from a container path](#cloning-world-from-a-container-path)
* [Overwrite world on start](#overwrite-world-on-start)
* [Datapacks](#datapacks)
* [Server configuration](#server-configuration)
* [Message of the Day](#message-of-the-day)
* [Difficulty](#difficulty)
@@ -132,11 +131,10 @@ By default, the container will download the latest version of the "vanilla" [Min
* [Autopause](#autopause)
* [Description](#description)
* [Enabling Autopause](#enabling-autopause)
* [Autostop](#autostop)
* [Running on RaspberryPi](#running-on-raspberrypi)
* [Contributing](#contributing)
<!-- Added by: runner, at: Wed Dec 22 13:01:43 UTC 2021 -->
<!-- Added by: runner, at: Tue Dec 14 02:14:33 UTC 2021 -->
<!--te-->
@@ -277,7 +275,7 @@ When using the image `itzg:/minecraft-server` without a tag, the `latest` image
| Tag name | Java version | Linux | JVM Type | Architecture |
| -------------- | -------------|--------|----------|-------------------|
| latest | 16 | Debian | Hotspot | amd64,arm64,armv7 |
| latest | 17 | Debian | Hotspot | amd64,arm64,armv7 |
| java8 | 8 | Alpine | Hotspot | amd64 |
| java8-multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 |
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
@@ -794,16 +792,6 @@ The following diagram shows how this option can be used in a compose deployment
### Overwrite world on start
The world will only be downloaded or copied if it doesn't exist already. Set `FORCE_WORLD_COPY=TRUE` to force overwrite the world on every server start.
### Datapacks
Datapacks can be installed in a similar manner to mods/plugins. There are many environment variables which function in the same way they do for [mods](#working-with-mods-and-plugins):
* `DATAPACKS`
* `DATAPACKS_FILE`
* `REMOVE_OLD_DATAPACKS`
* `REMOVE_OLD_DATAPACKS_DEPTH`
* `REMOVE_OLD_DATAPACKS_INCLUDE`
* `REMOVE_OLD_DATAPACKS_EXCLUDE`
Datapacks will be placed in `/data/$LEVEL/datapacks`
## Server configuration
By default, the server configuration will be created and set based on the following environment variables, but only the first time the server is started. If the `server.properties` file already exists, the values in them will not be changed.
@@ -1471,28 +1459,6 @@ The following environment variables define the behaviour of auto-pausing:
* `AUTOPAUSE_KNOCK_INTERFACE`, default `eth0`
<br>Describes the interface passed to the `knockd` daemon. If the default interface does not work, run the `ifconfig` command inside the container and derive the interface receiving the incoming connection from its output. The passed interface must exist inside the container. Using the loopback interface (`lo`) does likely not yield the desired results.
## Autostop
An option to stop the server after a specified time has been added for niche applications (e.g. billing saving on AWS Fargate). The function is incompatible with the Autopause functionality, as they basically cancel out each other.
Note that the docker container variables have to be set accordingly (restart policy set to "no") and that the container has to be manually restarted.
A starting, example compose file has been provided in [examples/docker-compose-autostop.yml](examples/docker-compose-autostop.yml).
Enable the Autostop functionality by setting:
```
-e ENABLE_AUTOSTOP=TRUE
```
The following environment variables define the behaviour of auto-stopping:
* `AUTOSTOP_TIMEOUT_EST`, default `3600` (seconds)
describes the time between the last client disconnect and the stopping of the server (read as timeout established)
* `AUTOSTOP_TIMEOUT_INIT`, default `1800` (seconds)
describes the time between server start and the stopping of the server, when no client connects inbetween (read as timeout initialized)
* `AUTOSTOP_PERIOD`, default `10` (seconds)
describes period of the daemonized state machine, that handles the stopping of the server
## Running on RaspberryPi
To run this image on a RaspberryPi 3 B+, 4, or newer, use any of the image tags [list in the Java version section](#running-minecraft-server-on-different-java-version) that specify `armv7` for the architecture, which includes `itzg/minecraft-server:latest`.
+1 -1
View File
@@ -12,4 +12,4 @@ if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
exit 1
fi
gosu minecraft bash -c "echo $* > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
echo "$@" > "${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"
-20
View File
@@ -1,20 +0,0 @@
version: '3.8'
services:
minecraft:
image: itzg/minecraft-server
ports:
- "25565:25565"
volumes:
- "mc:/data"
environment:
EULA: "TRUE"
ENABLE_AUTOSTOP: "TRUE"
# More aggressive settings for demo purposes
AUTOSTOP_TIMEOUT_INIT: "30"
AUTOSTOP_TIMEOUT_EST: "20"
# Important not to auto-restart the server!!!
restart: "no"
volumes:
mc: {}
-69
View File
@@ -1,69 +0,0 @@
#!/bin/bash
# needed for the clients connected function residing in autopause
. /autopause/autopause-fcns.sh
. ${SCRIPTS:-/}start-utils
# wait for java process to be started
while :
do
if java_process_exists ; then
break
fi
sleep 0.1
done
STATE=INIT
while :
do
case X$STATE in
XINIT)
# Server startup
if mc_server_listening ; then
TIME_THRESH=$(($(current_uptime)+$AUTOSTOP_TIMEOUT_INIT))
logAutostop "MC Server listening for connections - stopping in $AUTOSTOP_TIMEOUT_INIT seconds"
STATE=II
fi
;;
XII)
# Initial idle
if java_clients_connected ; then
logAutostop "Client connected - waiting for disconnect"
STATE=E
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutostop "No client connected since startup - stopping server"
/autostop/stop.sh
exit 0
fi
fi
;;
XE)
# Established
if ! java_clients_connected ; then
TIME_THRESH=$(($(current_uptime)+$AUTOSTOP_TIMEOUT_EST))
logAutostop "All clients disconnected - stopping in $AUTOSTOP_TIMEOUT_EST seconds"
STATE=I
fi
;;
XI)
# Idle
if java_clients_connected ; then
logAutostop "Client reconnected - waiting for disconnect"
STATE=E
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutostop "No client reconnected - stopping"
/autostop/stop.sh
exit 0
fi
fi
;;
*)
logAutostop "Error: invalid state: $STATE"
;;
esac
sleep $AUTOSTOP_PERIOD
done
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
. /start-utils
logAutostopAction "Stopping Java process"
kill -SIGTERM 1
+2 -2
View File
@@ -40,7 +40,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ $(id -u) = 0 ]; then
echo 'hosts: files dns' > /etc/nsswitch.conf
fi
exec gosu ${runAsUser}:${runAsGroup} ${SCRIPTS:-/}start-configuration "$@"
exec gosu ${runAsUser}:${runAsGroup} ${SCRIPTS:-/}start-configuration $@
else
exec ${SCRIPTS:-/}start-configuration "$@"
exec ${SCRIPTS:-/}start-configuration $@
fi
-34
View File
@@ -1,34 +0,0 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
: "${SERVER_PORT:=25565}"
export SERVER_PORT
log "Autostop functionality enabled"
isDebugging && set -x
if ! [[ $AUTOSTOP_PERIOD =~ ^[0-9]+$ ]]; then
AUTOSTOP_PERIOD=10
export AUTOSTOP_PERIOD
log "Warning: AUTOSTOP_PERIOD is not numeric, set to 10 (seconds)"
fi
if [ "$AUTOSTOP_PERIOD" -eq "0" ] ; then
AUTOSTOP_PERIOD=10
export AUTOSTOP_PERIOD
log "Warning: AUTOSTOP_PERIOD must not be 0, set to 10 (seconds)"
fi
if ! [[ $AUTOSTOP_TIMEOUT_EST =~ ^[0-9]+$ ]] ; then
AUTOSTOP_TIMEOUT_EST=3600
export AUTOSTOP_TIMEOUT_EST
log "Warning: AUTOSTOP_TIMEOUT_EST is not numeric, set to 3600 (seconds)"
fi
if ! [[ $AUTOSTOP_TIMEOUT_INIT =~ ^[0-9]+$ ]] ; then
AUTOSTOP_TIMEOUT_INIT=1800
export AUTOSTOP_TIMEOUT_INIT
log "Warning: AUTOSTOP_TIMEOUT_INIT is not numeric, set to 1800 (seconds)"
fi
/autostop/autostop-daemon.sh &
+16 -9
View File
@@ -37,11 +37,6 @@ if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${EXEC_DIRECTLY:-false}"; then
exit 1
fi
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${ENABLE_AUTOSTOP}"; then
log "ENABLE_AUTOPAUSE=true is incompatible with ENABLE_AUTOSTOP=true"
exit 1
fi
if [[ $PROXY ]]; then
export http_proxy="$PROXY"
export https_proxy="$PROXY"
@@ -101,10 +96,6 @@ if isTrue "${ENABLE_AUTOPAUSE}"; then
${SCRIPTS:-/}start-autopause
fi
if isTrue "${ENABLE_AUTOSTOP}"; then
${SCRIPTS:-/}start-autostop
fi
if versionLessThan 1.7; then
echo "
MC_HEALTH_EXTRA_ARGS=(
@@ -124,6 +115,12 @@ case "${TYPE^^}" in
;;
FORGE)
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
exec ${SCRIPTS:-/}start-deployForge "$@"
;;
@@ -136,6 +133,10 @@ case "${TYPE^^}" in
;;
FTB|CURSEFORGE)
log "**********************************************************************"
log "NOTE: Some mods and modpacks may require Java 8."
log " If so, use itzg/minecraft-server:java8"
log "**********************************************************************"
exec ${SCRIPTS:-/}start-deployCF "$@"
;;
@@ -180,6 +181,12 @@ case "${TYPE^^}" in
;;
CRUCIBLE)
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
;;
-77
View File
@@ -1,77 +0,0 @@
#!/bin/bash
set -e -o pipefail
: "${REMOVE_OLD_DATAPACKS:=false}"
: "${DATAPACKS_FILE:=}"
: "${REMOVE_OLD_DATAPACKS_DEPTH:=1} "
: "${REMOVE_OLD_DATAPACKS_INCLUDE:=*.zip}"
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
out_dir=/data/${LEVEL:-world}/datapacks
# Remove old datapacks
if isTrue "${REMOVE_OLD_DATAPACKS}" && [ -z "${DATAPACKS_FILE}" ]; then
if [ -d "$out_dir" ]; then
find "$out_dir" -mindepth 1 -maxdepth ${REMOVE_OLD_DATAPACKS_DEPTH:-16} -wholename "${REMOVE_OLD_DATAPACKS_INCLUDE:-*}" -not -wholename "${REMOVE_OLD_DATAPACKS_EXCLUDE:-}" -delete
fi
fi
if [[ "$DATAPACKS" ]]; then
mkdir -p "$out_dir"
for i in ${DATAPACKS//,/ }
do
if isURL "$i"; then
log "Downloading datapack $i ..."
if ! get -o "${out_dir}" "$i"; then
log "ERROR: failed to download from $i into $out_dir"
exit 2
fi
elif [[ -f "$i" && "$i" =~ .*\.zip ]]; then
log "Copying datapack located at $i ..."
out_file=$(basename "$i")
if ! cp "$i" "${out_dir}/$out_file"; then
log "ERROR: failed to copy from $i into $out_dir"
exit 2
fi
elif [[ -d "$i" ]]; then
log "Copying datapacks from $i ..."
cp "$i"/*.zip "${out_dir}"
else
log "ERROR Invalid URL or path given in DATAPACKS: $i"
exit 2
fi
done
elif [[ "$DATAPACKS_FILE" ]]; then
if [ ! -f "$DATAPACKS_FILE" ]; then
log "ERROR: given DATAPACKS_FILE file does not exist"
exit 2
fi
mkdir -p "$out_dir"
args=(
-o "${out_dir}"
--log-progress-each
--skip-existing
--uris-file "${DATAPACKS_FILE}"
)
if isTrue "${REMOVE_OLD_DATAPACKS}"; then
args+=(
--prune-others "${REMOVE_OLD_DATAPACKS_INCLUDE}"
--prune-depth "${REMOVE_OLD_DATAPACKS_DEPTH}"
)
fi
if ! get "${args[@]}" ; then
log "ERROR: failed to retrieve one or more datapacks"
exit 1
fi
fi
exec "${SCRIPTS:-/}start-setupModpack" "$@"
+1 -1
View File
@@ -69,4 +69,4 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] );
fi
fi
exec "${SCRIPTS:-/}start-setupDatapack" "$@"
exec "${SCRIPTS:-/}start-setupModpack" "$@"
+1 -18
View File
@@ -22,20 +22,6 @@ containsJars() {
return 1
}
containsPlugin() {
file=${1?}
pat='plugin.yml$'
while read -r line; do
if [[ $line =~ $pat ]]; then
return 0
fi
done <<<$(unzip -l "$file")
return 1
}
getResourceFromSpiget() {
resource=${1?}
@@ -95,12 +81,9 @@ downloadResourceFromSpiget() {
log "Extracting contents of resource ${resource} into plugins"
unzip -o -q -d /data/plugins "${tmpfile}"
rm "${tmpfile}"
elif containsPlugin "${tmpfile}"; then
else
log "Moving resource ${resource} into plugins"
mv "${tmpfile}" "/data/plugins/${resource}.jar"
else
log "ERROR downloaded resource '${resource}' seems to be not a valid plugin"
exit 2
fi
}
-8
View File
@@ -93,14 +93,6 @@ function logAutopauseAction() {
echo "[$(date -Iseconds)] [Autopause] $*"
}
function logAutostop() {
echo "[Autostop loop] $*"
}
function logAutostopAction() {
echo "[$(date -Iseconds)] [Autostop] $*"
}
function normalizeMemSize() {
local scale=1
case ${1,,} in