nix-bitcoin/pkgs/nodeinfo.sh

12 lines
309 B
Bash
Raw Normal View History

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