Ensure server.properties exists when clearing out white-list property (#584)

This commit is contained in:
Geoff Bourne authored and GitHub committed 2025-12-18 16:22:52 -06:00
1 parent 851fc953d3
commit b087dea303
1 file changed
+2 -1
+2 -1
View File
@@ -286,10 +286,11 @@ if [[ -n "$VARIABLES" ]]; then
fi fi
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) # 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 _SERVER_PROPERTIES=$(sed '/^white-list=.*/d' server.properties) #Removes white-list= line from server.properties
echo "${_SERVER_PROPERTIES}" > server.properties echo "${_SERVER_PROPERTIES}" > server.properties
fi
export ALLOW_LIST export ALLOW_LIST
# update server.properties with environment settings # update server.properties with environment settings