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