mynode/rootfs/standard/usr/bin/mynode_gen_lit_config.sh
2021-03-30 22:09:55 -05:00

23 lines
692 B
Bash
Executable File

#!/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