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

12 lines
719 B
Bash
Raw Normal View History

2021-03-09 03:55:39 +00:00
#!/bin/bash
# Gen environment file to swap mainnet/testnet
echo "" > /mnt/hdd/mynode/loop/env
if [ -f /mnt/hdd/mynode/settings/.testnet_enabled ]; then
echo "NETWORK=testnet" >> /mnt/hdd/mynode/loop/env
echo "LND_ADMIN_MACAROON_PATH=/mnt/hdd/mynode/lnd/data/chain/bitcoin/testnet/admin.macaroon" >> /mnt/hdd/mynode/loop/env
else
echo "NETWORK=mainnet" >> /mnt/hdd/mynode/loop/env
echo "LND_ADMIN_MACAROON_PATH=/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon" >> /mnt/hdd/mynode/loop/env
fi
chown bitcoin:bitcoin /mnt/hdd/mynode/loop/env