-
-
Save C-Otto/cd5d7b0e67fc2e3e212cf13a558b101f to your computer and use it in GitHub Desktop.
Amboss ping shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
Thanks for sharing! FYI I tweaked for CLN/c-lightning here: https://gist.github.com/swissrouting/111d4a615d670ddf8d11eaa8a60eacca