mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-28 15:31:37 +00:00
21 lines
727 B
Bash
Executable File
21 lines
727 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Generate LND Config
|
|
if [ -f /mnt/hdd/mynode/settings/lnd_custom.conf ]; then
|
|
# Use Custom Config
|
|
cp -f /mnt/hdd/mynode/settings/lnd_custom.conf /mnt/hdd/mynode/lnd/lnd.conf
|
|
else
|
|
# Generate a default config
|
|
cp -f /usr/share/mynode/lnd.conf /mnt/hdd/mynode/lnd/lnd.conf
|
|
|
|
# Append other sections
|
|
if [ -f /mnt/hdd/mynode/settings/.btc_lnd_tor_enabled ]; then
|
|
cat /usr/share/mynode/lnd_tor.conf >> /mnt/hdd/mynode/lnd/lnd.conf
|
|
else
|
|
cat /usr/share/mynode/lnd_ipv4.conf >> /mnt/hdd/mynode/lnd/lnd.conf
|
|
fi
|
|
fi
|
|
|
|
ALIAS=$(cat /mnt/hdd/mynode/settings/.lndalias)
|
|
sed -i "s/alias=.*/alias=$ALIAS/g" /mnt/hdd/mynode/lnd/lnd.conf
|
|
chown bitcoin:bitcoin /mnt/hdd/mynode/lnd/lnd.conf |