nix-bitcoin/pkgs/nodeinfo.sh
2018-11-29 00:30:12 +00:00

12 lines
309 B
Bash

set -e
set -o pipefail
printenv
BITCOIND_ONION=$(cat /var/lib/tor/onion/bitcoind/hostname)
CLIGHTNING_ID=$(sudo -u clightning lightning-cli --lightning-dir=/var/lib/clightning getinfo | jq -r '.id')
echo \{
echo " bitcoind_onion = \"$BITCOIND_ONION\";"
echo " clightning_id = \"$CLIGHTNING_ID\";"
echo \}