mynode/rootfs/standard/usr/bin/mynode_gen_lnd_config.sh
2019-11-04 19:34:19 -06:00

12 lines
409 B
Bash
Executable File

#!/bin/bash
# Generate LND Config
if [ -f /mnt/hdd/mynode/settings/lnd_custom.conf ]; then
cp -f /mnt/hdd/mynode/settings/lnd_custom.conf /mnt/hdd/mynode/lnd/lnd.conf
else
cp -f /usr/share/mynode/lnd.conf /mnt/hdd/mynode/lnd/lnd.conf
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