Browse Source

switch main/test fix

#146
rootzoll 7 years ago
parent
commit
d587dc1e8e
  1. 2
      home.admin/00mainMenu.sh
  2. 24
      home.admin/95switchMainTest.sh

2
home.admin/00mainMenu.sh

@ -9,7 +9,7 @@ TITLE=""
MENU="Choose one of the following options:"
OPTIONS=()
# default config values (my get changed later)
# default config values (might get changed later)
if [ ! -f ./.network ]; then
echo "bitcoin" > /home/admin/.network
fi

24
home.admin/95switchMainTest.sh

@ -32,23 +32,23 @@ function isMainnet(){
function switchToMainnet {
echo "switching to mainnet"
sed -i 's/^testnet=1/#testnet=1/g' $NETWORK_CONFIG
sed -i 's/^testnet=1/#testnet=1/g' $NETWORK_TEMPLATE
sed -i 's/^${network}.testnet=1/#${network}.testnet=1/g' $LND_CONFIG
sed -i 's/^#${network}.mainnet=1/${network}.mainnet=1/g' $LND_CONFIG
sed -i 's/^${network}.testnet=1/#${network}.testnet=1/g' $LND_TEMPLATE
sed -i 's/^#${network}.mainnet=1/${network}.mainnet=1/g' $LND_TEMPLATE
sed -i "s/^testnet=1/#testnet=1/g" $NETWORK_CONFIG
sed -i "s/^testnet=1/#testnet=1/g" $NETWORK_TEMPLATE
sed -i "s/^${network}.testnet=1/#${network}.testnet=1/g" $LND_CONFIG
sed -i "s/^#${network}.mainnet=1/${network}.mainnet=1/g" $LND_CONFIG
sed -i "s/^${network}.testnet=1/#${network}.testnet=1/g" $LND_TEMPLATE
sed -i "s/^#${network}.mainnet=1/${network}.mainnet=1/g" $LND_TEMPLATE
echo "OK switched to mainnet"
}
function switchToTestnet {
echo "switching to testnet"
sed -i 's/^#testnet=1/testnet=1/g' $NETWORK_CONFIG
sed -i 's/^#testnet=1/testnet=1/g' $NETWORK_TEMPLATE
sed -i 's/^#${network}.testnet=1/${network}.testnet=1/g' $LND_CONFIG
sed -i 's/^${network}.mainnet=1/#${network}.mainnet=1/g' $LND_CONFIG
sed -i 's/^#${network}.testnet=1/${network}.testnet=1/g' $LND_TEMPLATE
sed -i 's/^${network}.mainnet=1/#${network}.mainnet=1/g' $LND_TEMPLATE
sed -i "s/^#testnet=1/testnet=1/g" $NETWORK_CONFIG
sed -i "s/^#testnet=1/testnet=1/g" $NETWORK_TEMPLATE
sed -i "s/^#${network}.testnet=1/${network}.testnet=1/g" $LND_CONFIG
sed -i "s/^${network}.mainnet=1/#${network}.mainnet=1/g" $LND_CONFIG
sed -i "s/^#${network}.testnet=1/${network}.testnet=1/g" $LND_TEMPLATE
sed -i "s/^${network}.mainnet=1/#${network}.mainnet=1/g" $LND_TEMPLATE
echo "OK switched to testnet"
}

Loading…
Cancel
Save