diff --git a/Dockerfile b/Dockerfile index 1d10ae27..493e2d79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz -ARG MC_HELPER_VERSION=1.24.23 +ARG MC_HELPER_VERSION=1.25.0 ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \ | tar -C /usr/share -zxf - \ diff --git a/files/auto/autopause-daemon.sh b/files/auto/autopause-daemon.sh index 3e30f18d..1cbfcdbe 100644 --- a/files/auto/autopause-daemon.sh +++ b/files/auto/autopause-daemon.sh @@ -10,7 +10,7 @@ fi autopause_error_loop() { logAutopause "Available interfaces within the docker container:" - logAutopause " $(available_interfaces)" + logAutopause " $(mc-image-helper network-interfaces)" logAutopause "Please set the environment variable AUTOPAUSE_KNOCK_INTERFACE to the interface that handles incoming connections." logAutopause "If unsure which interface to choose, run the ifconfig command in the container." logAutopause "Autopause failed to initialize. This log entry will be printed every 30 minutes." @@ -35,7 +35,7 @@ if [[ -z "$AUTOPAUSE_KNOCK_INTERFACE" ]] ; then logAutopause "AUTOPAUSE_KNOCK_INTERFACE variable must not be empty!" autopause_error_loop fi -if ! available_interfaces | grep -q "$AUTOPAUSE_KNOCK_INTERFACE" ; then +if ! mc-image-helper network-interfaces --check="$AUTOPAUSE_KNOCK_INTERFACE" ; then logAutopause "Selected interface \"$AUTOPAUSE_KNOCK_INTERFACE\" does not exist!" autopause_error_loop fi diff --git a/files/auto/autopause-fcns.sh b/files/auto/autopause-fcns.sh index 7e5d1ea9..975227cd 100644 --- a/files/auto/autopause-fcns.sh +++ b/files/auto/autopause-fcns.sh @@ -34,8 +34,4 @@ java_clients_connections() { java_clients_connected() { (( $(java_clients_connections) > 0 )) -} - -available_interfaces() { - ifconfig -s | tail +2 | cut -f1 -d ' ' -} +} \ No newline at end of file