mirror of
https://github.com/azures04/crafatar.git
synced 2026-05-06 11:00:39 +02:00
flush redis after connection established, improve bulk.sh
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
host="$1"
|
||||
if [ -z "$host" ]; then
|
||||
echo "Usage: $0 <host>"
|
||||
exit 1
|
||||
fi
|
||||
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
rm -f "$dir/../skins/"*.png || exit 1
|
||||
for uuid in `cat "$dir/uuids.txt"`; do
|
||||
@@ -8,5 +13,5 @@ for uuid in `cat "$dir/uuids.txt"`; do
|
||||
if [ "$(( ((RANDOM<<15)|RANDOM) % 2 ))" -eq "1" ]; then
|
||||
helm="&helm"
|
||||
fi
|
||||
curl -sS -o /dev/null -w "%{url_effective} %{http_code} %{time_total}s\\n" "http://crafatar.com/avatars/$uuid?size=$size$helm" || exit 1
|
||||
curl -sSL -o /dev/null -w "%{url_effective} %{http_code} %{time_total}s\\n" "http://$host/avatars/$uuid?size=$size$helm" || exit 1
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user