Compare commits

..
4 changed files with 18 additions and 19 deletions
+1 -1
View File
@@ -93,5 +93,5 @@ The multiarch images are built and published by [a Github action](https://github
The following git command can be used to provide the bulk of release notes content: The following git command can be used to provide the bulk of release notes content:
```shell script ```shell script
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="* %s" 1.1.0..1.2.0 git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="- %s" 1.1.0..1.2.0
``` ```
+1 -1
View File
@@ -1,4 +1,4 @@
FROM eclipse-temurin:16-jdk FROM eclipse-temurin:17-jdk
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>" LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
+4 -4
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
current_uptime() { current_uptime() {
awk '{print $1}' /proc/uptime | cut -d . -f 1 echo $(awk '{print $1}' /proc/uptime | cut -d . -f 1)
} }
java_running() { java_running() {
@@ -17,15 +17,15 @@ rcon_client_exists() {
} }
mc_server_listening() { mc_server_listening() {
mc-monitor status --host localhost --port "$SERVER_PORT" --timeout 10s >& /dev/null mc-monitor status --host localhost --port $SERVER_PORT --timeout 10s >& /dev/null
} }
java_clients_connected() { java_clients_connected() {
local connections local connections
if java_running ; then if java_running ; then
connections=$(mc-monitor status --host localhost --port "$SERVER_PORT" --show-player-count) connections=$(mc-monitor status --host localhost --port $SERVER_PORT --show-player-count)
else else
connections=0 connections=0
fi fi
(( connections > 0 )) (( $connections > 0 ))
} }
+12 -13
View File
@@ -1,18 +1,17 @@
#!/bin/bash #!/bin/bash
# shellcheck source=start-utils . ${SCRIPTS:-/}start-utils
. "${SCRIPTS:-/}start-utils"
set -e set -e
: "${REPLACE_ENV_IN_PLACE:=${REPLACE_ENV_VARIABLES:-false}}" : ${REPLACE_ENV_IN_PLACE:=${REPLACE_ENV_VARIABLES:-false}}
: "${REPLACE_ENV_PATHS:=/data}" : ${REPLACE_ENV_PATHS:=/data}
: "${REPLACE_ENV_SUFFIXES:=yml,yaml,txt,cfg,conf,properties,hjson,json,tml,toml}" : ${REPLACE_ENV_SUFFIXES:=yml,yaml,txt,cfg,conf,properties,hjson,json,tml,toml}
: "${REPLACE_ENV_VARIABLE_PREFIX:=${ENV_VARIABLE_PREFIX:-CFG_}}" : ${REPLACE_ENV_VARIABLE_PREFIX:=${ENV_VARIABLE_PREFIX:-CFG_}}
: "${REPLACE_ENV_VARIABLES_EXCLUDES:=}" : ${REPLACE_ENV_VARIABLES_EXCLUDES:=}
: "${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}" : ${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}
: "${PATCH_DEFINITIONS:=}" : ${PATCH_DEFINITIONS:=}
: "${DEBUG:=false}" : ${DEBUG:=false}
if isTrue "${REPLACE_ENV_IN_PLACE}"; then if isTrue "${REPLACE_ENV_IN_PLACE}"; then
log "Replacing env variables in ${REPLACE_ENV_PATHS} that match the prefix $REPLACE_ENV_VARIABLE_PREFIX ..." log "Replacing env variables in ${REPLACE_ENV_PATHS} that match the prefix $REPLACE_ENV_VARIABLE_PREFIX ..."
@@ -21,15 +20,15 @@ if isTrue "${REPLACE_ENV_IN_PLACE}"; then
--replace-env-file-suffixes="${REPLACE_ENV_SUFFIXES}" \ --replace-env-file-suffixes="${REPLACE_ENV_SUFFIXES}" \
--replace-env-excludes="${REPLACE_ENV_VARIABLES_EXCLUDES}" \ --replace-env-excludes="${REPLACE_ENV_VARIABLES_EXCLUDES}" \
--replace-env-exclude-paths="${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS}" \ --replace-env-exclude-paths="${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS}" \
--replace-env-prefix="${REPLACE_ENV_VARIABLE_PREFIX}" \ --replace-env-prefix=${REPLACE_ENV_VARIABLE_PREFIX} \
"${REPLACE_ENV_PATHS[@]}" "${REPLACE_ENV_PATHS[@]}"
fi fi
if [[ ${PATCH_DEFINITIONS} ]]; then if [[ ${PATCH_DEFINITIONS} ]]; then
log "Applying patch definitions from ${PATCH_DEFINITIONS}" log "Applying patch definitions from ${PATCH_DEFINITIONS}"
mc-image-helper --debug=${DEBUG} patch \ mc-image-helper --debug=${DEBUG} patch \
--patch-env-prefix="${REPLACE_ENV_VARIABLE_PREFIX}" \ --patch-env-prefix=${REPLACE_ENV_VARIABLE_PREFIX} \
"${PATCH_DEFINITIONS}" "${PATCH_DEFINITIONS}"
fi fi
exec "${SCRIPTS:-/}start-finalExec" "$@" exec ${SCRIPTS:-/}start-finalExec $@