| 1 | #!/bin/sh |
| 2 | # Month end: finance pulls the trial balance, eight at a time, for a minute. |
| 3 | # It's on the wallet's internal port, so it takes our ops tools' certificate. |
| 4 | ops="--cacert secrets/tls/ops/ca.pem --cert secrets/tls/ops/cert.pem --key secrets/tls/ops/key.pem" |
| 5 | url="https://wallet:9091/internal/trial-balance.csv?date=$(date -u +%F)" |
| 6 | end=$(($(date +%s) + 60)) |
| 7 | for i in 1 2 3 4 5 6 7 8; do |
| 8 | while [ "$(date +%s)" -lt "$end" ]; do |
| 9 | curl -s $ops --connect-to ::localhost: -o /dev/null "$url" |
| 10 | done & |
| 11 | done |
| 12 | wait |