-

@ Mumbo
2025-02-19 07:22:01
Just sharing what I've been working on.
```
#!/bin/bash
set -e
A1="28.1"
B1="bitcoin-${A1}-x86_64-linux-gnu.tar.gz"
C1="https://bitcoincore.org/bin/bitcoin-core-${A1}/${B1}"
D1="/usr/local/bin"
E1="u53R_$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c12)"
F1="p@5s_$(head /dev/urandom | tr -dc A-Za-z0-9!@#\$%^&*()_+ | head -c16)"
G1="tcp://127.0.0.1:28332"
H1="tcp://127.0.0.1:28333"
I1="v0.18.5-beta"
J1="lnd-linux-amd64-${I1}.tar.gz"
K1="https://github.com/lightningnetwork/lnd/releases/download/${I1}/${J1}"
L1="https://github.com/lightningnetwork/lnd/releases/download/${I1}/manifest-${I1}.txt"
M1="https://github.com/lightningnetwork/lnd/releases/download/${I1}/manifest-${I1}.txt.sig"
N1="8B3F86ED7057F08D"
X1() { printf "\x1b[0;32m%s\x1b[0m\n" "$1"; }
Y1() { { [ -d "$(dirname "$1")" ] || mkdir -p "$(dirname "$1")"; }; echo "$2" > "$1"; }
X1 "."
sudo apt update
sudo apt install -y git curl tar wget build-essential gpg
X1 "."
curl -fsSL "$C1" -o "$B1"
X1 "."
tar -xf "$B1"
sudo install $(find bitcoin-${A1}/bin/ -type f) "$D1"
X1 "."
Y1 "$HOME/.bitcoin/bitcoin.conf" "server=1
txindex=1
rpcuser=${E1}
rpcpassword=${F1}
zmqpubrawblock=${G1}
zmqpubrawtx=${H1}"
X1 "."
bitcoind -daemon
X1 "."
curl -fsSL "$K1" -o "$J1"
X1 "."
curl -fsSL "$L1" -o "manifest-${I1}.txt"
curl -fsSL "$M1" -o "manifest-${I1}.txt.sig"
gpg --keyserver keyserver.ubuntu.com --recv-keys "$N1"
gpg --verify "manifest-${I1}.txt.sig" "manifest-${I1}.txt"
X1 "."
tar -xf "$J1"
sudo mv $(find lnd-linux-amd64-${I1}/ -type f) "$D1"
X1 "."
Y1 "$HOME/.lnd/lnd.conf" "$(echo -e "[Application Options]
alias=node_$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c8)
color=#$(head /dev/urandom | tr -dc A-F0-9 | head -c6)
[Bitcoin]
bitcoin.active=1
bitcoin.node=bitcoind
bitcoin.mainnet=1
[Bitcoind]
bitcoind.rpchost=127.0.0.1
bitcoind.rpcuser=${E1}
bitcoind.rpcpass=${F1}
bitcoind.zmqpubrawblock=${G1}
bitcoind.zmqpubrawtx=${H1}")"
X1 "."
lnd &
```
originally posted at https://stacker.news/items/890340