Skip to content

Instantly share code, notes, and snippets.

Last active January 4, 2023 09:23
What would you like to do?
Amboss ping shell script
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
Copy link

Thanks for sharing! FYI I tweaked for CLN/c-lightning here:

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