mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-18 21:51:21 +00:00
Parse .mc-health.env instead of sourcing it (#4399)
This commit is contained in:
1 file changed
+13
-1
+13
-1
@@ -1,8 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
. "/image/scripts/start-utils"
|
||||
# The healthcheck runs as root, but /data is writable by the server, so only
|
||||
# known settings are read from this file; it is never sourced.
|
||||
MC_HEALTH_EXTRA_ARGS=()
|
||||
if [ -f /data/.mc-health.env ]; then
|
||||
. /data/.mc-health.env
|
||||
while read -r line; do
|
||||
case "$line" in
|
||||
DISABLE_HEALTHCHECK=true)
|
||||
DISABLE_HEALTHCHECK=true
|
||||
;;
|
||||
--use-old-server-list-ping|--use-server-list-ping|--use-proxy)
|
||||
MC_HEALTH_EXTRA_ARGS+=("$line")
|
||||
;;
|
||||
esac
|
||||
done < /data/.mc-health.env
|
||||
fi
|
||||
|
||||
if isTrue "${DISABLE_HEALTHCHECK}"; then
|
||||
|
||||
Reference in new issue
Block a user