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