Skip to content

Commit

Permalink
even more endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
maddox committed Nov 3, 2023
1 parent f4596d9 commit 13a2dad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions run
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/sh

while true; do
curl "$NIGHTSCOUT_HOST/api/v1/status.json?token=$NIGHTSCOUT_TOKEN" | aws s3 cp - "s3://$AWS_S3_BUCKET/api/v1/status.json"
aws s3api put-object-acl --bucket "$AWS_S3_BUCKET" --key api/v1/status.json --acl public-read

curl "$NIGHTSCOUT_HOST/api/v1/treatments.json?token=$NIGHTSCOUT_TOKEN" | aws s3 cp - "s3://$AWS_S3_BUCKET/api/v1/treatments.json"
aws s3api put-object-acl --bucket "$AWS_S3_BUCKET" --key api/v1/treatments.json --acl public-read

curl "$NIGHTSCOUT_HOST/api/v1/devicestatus.json?token=$NIGHTSCOUT_TOKEN" | aws s3 cp - "s3://$AWS_S3_BUCKET/api/v1/devicestatus.json"
aws s3api put-object-acl --bucket "$AWS_S3_BUCKET" --key api/v1/devicestatus.json --acl public-read

curl "$NIGHTSCOUT_HOST/api/v1/entries.json?token=$NIGHTSCOUT_TOKEN" | aws s3 cp - "s3://$AWS_S3_BUCKET/api/v1/entries.json"
aws s3api put-object-acl --bucket "$AWS_S3_BUCKET" --key api/v1/entries.json --acl public-read

Expand Down

0 comments on commit 13a2dad

Please sign in to comment.