mynode/rootfs/standard/usr/bin/mynode_gen_lit_config.sh

23 lines
692 B
Bash
Raw Normal View History

2021-03-31 03:09:55 +00:00
#!/bin/bash
# Setup Initial LND Node Name
if [ ! -f /mnt/hdd/mynode/settings/.lndalias ]; then
echo "mynodebtc.com [myNode]" > /mnt/hdd/mynode/settings/.lndalias
fi
# Generate Lightning Terminal Config
if [ -f /mnt/hdd/mynode/settings/lit_custom.conf ]; then
# Use Custom Config
cp -f /mnt/hdd/mynode/settings/lit_custom.conf /mnt/hdd/mynode/lit/lit.conf
else
# Generate a default config
cp -f /usr/share/mynode/lit.conf /mnt/hdd/mynode/lit/lit.conf
# Adjust Mainnet/Testnet
if [ -f /mnt/hdd/mynode/settings/.testnet_enabled ]; then
sed -i "s/mainnet/testnet/g" /mnt/hdd/mynode/lit/lit.conf
fi
fi
chown bitcoin:bitcoin /mnt/hdd/mynode/lit/lit.conf