Skip to content

Instantly share code, notes, and snippets.

@C-Otto
Last active January 4, 2023 09:23
Show Gist options
  • 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
@swissrouting
Copy link

Thanks for sharing! FYI I tweaked for CLN/c-lightning here: https://gist.github.com/swissrouting/111d4a615d670ddf8d11eaa8a60eacca

@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