Skip to content

Instantly share code, notes, and snippets.

@C-Otto
Last active January 4, 2023 09:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save C-Otto/cd5d7b0e67fc2e3e212cf13a558b101f to your computer and use it in GitHub Desktop.
Save C-Otto/cd5d7b0e67fc2e3e212cf13a558b101f to your computer and use it in GitHub Desktop.
Amboss ping shell script
#!/bin/bash
URL="https://api.amboss.space/graphql"
NOW=$(date -u +%Y-%m-%dT%H:%M:%S%z)
SIGNATURE=$(lncli signmessage "$NOW" | jq -r .signature)
JSON="{\"query\": \"mutation HealthCheck(\$signature: String!, \$timestamp: String!) { healthCheck(signature: \$signature, timestamp: \$timestamp) }\", \"variables\": {\"signature\": \"$SIGNATURE\", \"timestamp\": \"$NOW\"}}"
echo "$JSON" | curl -s --data-binary @- -H "Content-Type: application/json" -X POST --output /dev/null $URL
@GaryBanderas
Copy link

GaryBanderas commented Jul 6, 2022

thanks it works! I had to replace lncli signmessage with ~/umbrel/bin/lncli signmessage (Umbrel version 0.4.18)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment