zeroing out the files

This commit is contained in:
Kevin Brewer 2025-01-10 11:29:23 -05:00
parent 06aecbb468
commit d65c343442

View file

@ -50,7 +50,7 @@ fi
if [[ -n "$ONLINE_MODE" ]]; then if [[ -n "$ONLINE_MODE" ]]; then
sed -i "s/online-mode=.*/online-mode=$ONLINE_MODE/" /data/server.properties sed -i "s/online-mode=.*/online-mode=$ONLINE_MODE/" /data/server.properties
fi fi
[[ ! -f whitelist.json ]] && echo "[]" > whitelist.json echo "[]" > whitelist.json
IFS=',' read -ra USERS <<< "$WHITELIST_USERS" IFS=',' read -ra USERS <<< "$WHITELIST_USERS"
for raw_username in "${USERS[@]}"; do for raw_username in "${USERS[@]}"; do
username=$(echo "$raw_username" | xargs) username=$(echo "$raw_username" | xargs)
@ -72,7 +72,7 @@ for raw_username in "${USERS[@]}"; do
echo "Whitelist: Failed to fetch UUID for $username." echo "Whitelist: Failed to fetch UUID for $username."
fi fi
done done
[[ ! -f ops.json ]] && echo "[]" > ops.json echo "[]" > ops.json
IFS=',' read -ra OPS <<< "$OP_USERS" IFS=',' read -ra OPS <<< "$OP_USERS"
for raw_username in "${OPS[@]}"; do for raw_username in "${OPS[@]}"; do
username=$(echo "$raw_username" | xargs) username=$(echo "$raw_username" | xargs)