Updating whitelist environment variable to WHITE_LIST_USERS instead of WHITE_LIST to prevent eclipsing original behavior (#105)
This commit is contained in:
1 parent
ee8467a518
commit
d9f9cdd947
2 files changed
+7
-4
No files matched your search
@@ -136,10 +136,13 @@ are also printed to the log when a player joins. There are 3 levels of permissio
|
||||
|
||||
## Whitelist
|
||||
|
||||
The whitelist works with player names. The server will look up the names and add in the XUID to match the player.
|
||||
There are two ways to handle a whitelist. The first is to set the `WHITE_LIST` environment variable to true and map
|
||||
in a whitelist.json that is custom-crafted to the container. The other is to use the `WHITE_LIST_USERS` environment
|
||||
variable to list users that should be whitelisted. This list is player names. The server will look up the names and
|
||||
add in the XUID to match the player.
|
||||
|
||||
```shell
|
||||
-e WHITE_LIST "player1,player2,player3"
|
||||
-e WHITE_LIST_USERS "player1,player2,player3"
|
||||
```
|
||||
|
||||
## More information
|
||||
|
||||
+2
-2
@@ -109,10 +109,10 @@ if [ -n "$OPS" ] || [ -n "$MEMBERS" ] || [ -n "$VISITORS" ]; then
|
||||
echo "]" >> permissions.json
|
||||
fi
|
||||
|
||||
if [ -n "$WHITE_LIST" ]; then
|
||||
if [ -n "$WHITE_LIST_USERS" ]; then
|
||||
echo "Setting whitelist"
|
||||
rm -rf whitelist.json
|
||||
echo $WHITE_LIST | awk -v RS=, 'BEGIN{print "["}; {print "{ \"name\": \"" $1 "\" },"}; END{print "]"}' > whitelist.json
|
||||
echo $WHITE_LIST_USERS | awk -v RS=, 'BEGIN{print "["}; {print "{ \"name\": \"" $1 "\" },"}; END{print "]"}' > whitelist.json
|
||||
# flag whitelist to true so the server properties process correctly
|
||||
export WHITE_LIST=true
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user