-
Notifications
You must be signed in to change notification settings - Fork 3
/
pin_content_in_cluster.sh
executable file
·60 lines (53 loc) · 2.11 KB
/
pin_content_in_cluster.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/bash
set -e
echo "Preparing to pin content in cluster..."
TO_PIN=(
'QmSR7ELqgrwQEWkmDFLjeeMeZBcRpzV7K8G1j9yvJnWyH9'
'QmbWJCHaKEFULo5FmmQgZSppfET7yThk3erBdYaYtkDRmd'
'Qmc46FrUcsMUrpYEJrkKB9MmaXMeWJHGoqTL7MPReR3UYM'
'QmdCwW6WVqzDnEjWFSkztSNaxDSPQuWH4BEqFgc96iuoGC'
'QmdyWKUVgbkB6wuB6z6adGAUZ56eKCcJiB3N45dvA6K1hN'
'QmZrggXgBBzgwcSAMBsNchH354Mi9pZDAEQRHshbkUMeRM'
'QmURv1xdQvzgLunCoxoxsRPWmEbjitMCNajdDNK1fQA45d'
'QmZZpLbHxoaw4feXyXMWw9BbLxusY1aJ57foF8echmSELD'
'QmSG4JpZ9JUXivoFKVaUH7KXfeB75bfidR4n5qjwDbkqH7'
'QmWBYHF9xdFApjUCeHtJVeSzekMuuUmNcGQsASTrSk78JH'
'QmbWJCHaKEFULo5FmmQgZSppfET7yThk3erBdYaYtkDRmd'
'QmSR7ELqgrwQEWkmDFLjeeMeZBcRpzV7K8G1j9yvJnWyH9'
'QmS9YJvLe1E3CSzqiNViuJgKgKeXJv3uZLZmyyVeW7AQY7'
'Qmbv3xms1rUV9VQ8x49rhC3bNaWSpuzLSAtX1CWQZrTPyZ'
'QmWi9e7UWhJKPixsEshdVBZRZD4eh6nNXBNQ4emFfYoNTh'
'QmdMmVi6REUjP9zbFYCFxJWxaoV77L9iLQcBLda3q4Tyk1'
'QmRegQwX27Uexh8DQaczTrdwVn4gMdwFReNEBJcPh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M % 100 ]]
echo "Pinning $i in $RND_NUM"
sleep $RND_NUM
curl --silent -X POST http://$HOST/api/pin/$i > /dev/null
done
echo "Done pinning!"