diff --git a/home.admin/00infoLCD.sh b/home.admin/00infoLCD.sh index 630ca90..80c7797 100755 --- a/home.admin/00infoLCD.sh +++ b/home.admin/00infoLCD.sh @@ -48,7 +48,6 @@ while : # check hostname and get backup if from old config if [ ${#hostname} -eq 0 ]; then - echo "backup info: hostname" hostname=`sudo cat /home/admin/.hostname` if [ ${#hostname} -eq 0 ]; then hostname="raspiblitz" @@ -57,18 +56,20 @@ while : # check network and get backup if from old config if [ ${#network} -eq 0 ]; then - echo "backup info: network" network="bitcoin" - litecoinActive=$(sudo ls /mnt/hdd/litecoin/litecoin.conf | grep -c 'litecoin.conf') + litecoinActive=$(sudo ls /mnt/hdd/litecoin/litecoin.conf 2>/dev/null | grep -c 'litecoin.conf') if [ ${litecoinActive} -eq 1 ]; then network="litecoin" + else + network=`sudo cat /home/admin/.network 2>/dev/null` + fi + if [ ${#network} -eq 0 ]; then + network="bitcoin" fi - network=`sudo cat /home/admin/.network` fi # check chain and get backup if from system if [ ${#chain} -eq 0 ]; then - echo "backup info: chain" chain="test" isMainChain=$(sudo cat /mnt/hdd/${network}/${network}.conf 2>/dev/null | grep "#testnet=1" -c) if [ ${isMainChain} -gt 0 ];then diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index 49fa353..d79297f 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -63,13 +63,17 @@ fi # check network and get backup if from old config if [ ${#network} -eq 0 ]; then - echo "backup info: network" - network="bitcoin" - litecoinActive=$(sudo ls /mnt/hdd/litecoin/litecoin.conf | grep -c 'litecoin.conf') - if [ ${litecoinActive} -eq 1 ]; then - network="litecoin" - fi - network=`sudo cat /home/admin/.network` + echo "backup info: network" + network="bitcoin" + litecoinActive=$(sudo ls /mnt/hdd/litecoin/litecoin.conf 2>/dev/null | grep -c 'litecoin.conf') + if [ ${litecoinActive} -eq 1 ]; then + network="litecoin" + else + network=`sudo cat /home/admin/.network 2>/dev/null` + fi + if [ ${#network} -eq 0 ]; then + network="bitcoin" + fi fi # check chain and get backup if from system