@ -40,3 +40,6 @@ ops=$(options-get ops) || true
minecraft:make-ops "$ops"
minecraft:make-properties "$properties"
service_def=$(get_compose_service_def "$SERVICE_NAME") || exit 1
minecraft:config-hash "$service_def"
@ -74,3 +74,14 @@ minecraft:make-properties() {
} > "$SERVICE_DATASTORE/${MINECRAFT_DATA}/server.properties"
}
minecraft:config-hash() {
local opts="$1"
debug "Adding config hash to enable recreating upon config change."
config_hash=$(e "$opts" | md5_compat) || exit 1
init-config-add "
$SERVICE_NAME:
labels:
- compose.config_hash=$config_hash
"