Skip to content

Commit b087dea

Browse files
authored
Ensure server.properties exists when clearing out white-list property (#584)
1 parent 851fc95 commit b087dea

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

bedrock-entry.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,11 @@ if [[ -n "$VARIABLES" ]]; then
286286
fi
287287

288288

289-
290-
# prevent issue with bind mounted server.properties which can not be moved (sed tries to move the file when '-i' is used)
291-
_SERVER_PROPERTIES=$(sed '/^white-list=.*/d' server.properties) #Removes white-list= line from server.properties
292-
echo "${_SERVER_PROPERTIES}" > server.properties
289+
if [ -f server.properties ]; then
290+
# prevent issue with bind mounted server.properties which can not be moved (sed tries to move the file when '-i' is used)
291+
_SERVER_PROPERTIES=$(sed '/^white-list=.*/d' server.properties) #Removes white-list= line from server.properties
292+
echo "${_SERVER_PROPERTIES}" > server.properties
293+
fi
293294
export ALLOW_LIST
294295

295296
# update server.properties with environment settings

0 commit comments

Comments
 (0)