nix-bitcoin/pkgs/nodeinfo.sh

10 lines
263 B
Bash
Raw Normal View History

2018-11-20 14:14:40 -08:00
sleep 5
OUTFILE=/var/lib/nodeinfo.nix
rm -f $OUTFILE
{
echo \{
echo " bitcoind_onion = \"$(cat /var/lib/tor/onion/bitcoind/hostname)\";"
2018-11-22 10:32:26 -08:00
echo " clightning_id = \"$(sudo -u clightning lightning-cli getinfo | jq -r '.id')\";"
2018-11-20 14:14:40 -08:00
echo \}
} > $OUTFILE