From b087dea303cb47454745aa29cdffc0dfea7c37c9 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 18 Dec 2025 16:22:52 -0600 Subject: [PATCH] Ensure server.properties exists when clearing out white-list property (#584) --- bedrock-entry.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bedrock-entry.sh b/bedrock-entry.sh index 6287056..4bdd024 100755 --- a/bedrock-entry.sh +++ b/bedrock-entry.sh @@ -286,10 +286,11 @@ if [[ -n "$VARIABLES" ]]; then fi - -# prevent issue with bind mounted server.properties which can not be moved (sed tries to move the file when '-i' is used) -_SERVER_PROPERTIES=$(sed '/^white-list=.*/d' server.properties) #Removes white-list= line from server.properties -echo "${_SERVER_PROPERTIES}" > server.properties +if [ -f server.properties ]; then + # prevent issue with bind mounted server.properties which can not be moved (sed tries to move the file when '-i' is used) + _SERVER_PROPERTIES=$(sed '/^white-list=.*/d' server.properties) #Removes white-list= line from server.properties + echo "${_SERVER_PROPERTIES}" > server.properties +fi export ALLOW_LIST # update server.properties with environment settings