File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -165,23 +165,24 @@ if [ -n "$OPS" ] || [ -n "$MEMBERS" ] || [ -n "$VISITORS" ]; then
165
165
]| flatten' > permissions.json
166
166
fi
167
167
168
+ if [[ -n " $ALLOW_LIST_USERS " || -n " $WHITE_LIST_USERS " ]]; then
169
+ allowListUsers=${ALLOW_LIST_USERS:- $WHITE_LIST_USERS }
168
170
169
- if [[ -v ALLOW_LIST_USERS || -v WHITE_LIST_USERS ]]; then
170
- allowListUsers=${ALLOW_LIST_USERS:- ${WHITE_LIST_USERS} }
171
-
172
- WHITE_LIST=false
173
- rm -f whitelist.json
174
- if [[ $allowListUsers ]]; then
171
+ if [[ " $allowListUsers " ]]; then
175
172
echo " Setting allow list"
176
173
jq -c -n --arg users " $allowListUsers " ' $users | split(",") | map({"ignoresPlayerLimit":false,"name": .})' > " allowlist.json"
177
174
# activate server property to enable list usage
178
175
ALLOW_LIST=true
179
176
else
180
- rm -rf allowlist.json
181
177
ALLOW_LIST=false
178
+ rm -f allowlist.json
182
179
fi
183
- export WHITE_LIST ALLOW_LIST
180
+ else
181
+ ALLOW_LIST=false
182
+ rm -f allowlist.json
184
183
fi
184
+ sed -i ' /^white-list=.*/d' server.properties # Removes white-list= line from server.properties
185
+ export ALLOW_LIST
185
186
186
187
set-property --file server.properties --bulk /etc/bds-property-definitions.json
187
188
You can’t perform that action at this time.
0 commit comments