diff options
Diffstat (limited to 'update-relays.sh')
-rwxr-xr-x | update-relays.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/update-relays.sh b/update-relays.sh index 4a1dcc8c6ef9..ef63dcd6afbf 100755 --- a/update-relays.sh +++ b/update-relays.sh @@ -2,18 +2,18 @@ read -d '' JSONRPC_CODE <<-JSONRPC_CODE var buff = ""; process.stdin.on('data', function (chunk) { - buff += chunk; + buff += chunk; }) process.stdin.on('end', function () { - var obj = JSON.parse(buff); - var output = JSON.stringify(obj.result, null, ' '); - process.stdout.write(output); + var obj = JSON.parse(buff); + var output = JSON.stringify(obj.result, null, ' '); + process.stdout.write(output); }) JSONRPC_CODE JSONRPC_RESPONSE="$(curl -X POST \ --fail \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": "0", "method": "relay_list_v3"}' \ - https://api.mullvad.net/rpc/)" + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": "0", "method": "relay_list_v3"}' \ + https://api.mullvad.net/rpc/)" echo "$JSONRPC_RESPONSE" | node -e "$JSONRPC_CODE" > dist-assets/relays.json |