|
1 | 1 | #!/bin/bash |
2 | 2 | # |
3 | | -# Name: DigiNode Dashboard v0.11.2 |
| 3 | +# Name: DigiNode Dashboard v0.11.3 |
4 | 4 | # |
5 | 5 | # Purpose: Monitor and manage the status of you DigiByte Node and DigiAsset Node. |
6 | 6 | # |
|
47 | 47 | # The version number should be three numbers seperated by a period |
48 | 48 | # Do not change this number or the mechanism for installing updates may no longer work. |
49 | 49 |
|
50 | | -DGNT_VER_LOCAL=0.11.2 |
51 | | -# Last Updated: 2025-04-21 |
| 50 | +DGNT_VER_LOCAL=0.11.3 |
| 51 | +# Last Updated: 2025-04-22 |
52 | 52 |
|
53 | 53 | # Convert to a fixed width string of 9 characters to display in the script |
54 | 54 | DGNT_VER_LOCAL_FW=$(printf "%-9s" "v$DGNT_VER_LOCAL") |
@@ -3672,15 +3672,15 @@ if [ $TIME_DIF_10SEC -ge 10 ]; then |
3672 | 3672 | TROUBLESHOOTING_MSG="10sec: startingup > running" |
3673 | 3673 | DGB_STATUS="running" |
3674 | 3674 |
|
3675 | | - # Get current listening port |
3676 | | - DGB_LISTEN_PORT=$($DGB_CLI getnetworkinfo 2>/dev/null | jq .localaddresses[0].port) |
3677 | | - |
3678 | 3675 | # scrape digibyte.conf |
3679 | 3676 | scrape_digibyte_conf |
3680 | 3677 |
|
3681 | 3678 | # query for digibyte network |
3682 | 3679 | query_digibyte_chain |
3683 | 3680 |
|
| 3681 | + # query for digibyte listening port |
| 3682 | + query_digibyte_port |
| 3683 | + |
3684 | 3684 | # update max connections |
3685 | 3685 | query_digibyte_maxconnections |
3686 | 3686 |
|
@@ -3791,20 +3791,25 @@ if [ $TIME_DIF_10SEC -ge 10 ]; then |
3791 | 3791 | DGB2_TROUBLESHOOTING_MSG="10sec: startingup > running" |
3792 | 3792 | DGB2_STATUS="running" |
3793 | 3793 |
|
3794 | | - # Get current listening port |
3795 | | - DGB2_LISTEN_PORT=$($DGB_CLI -testnet getnetworkinfo 2>/dev/null | jq .localaddresses[0].port) |
| 3794 | + # if the primary node is running, we have just run all these checks so we don't need to do it again in the same loop |
| 3795 | + if [ "$DGB_STATUS" != "running" ] && [ "$DGB_STATUS" != "startingup" ]; then |
3796 | 3796 |
|
3797 | | - # scrape digibyte.conf |
3798 | | - scrape_digibyte_conf |
| 3797 | + # scrape digibyte.conf |
| 3798 | + scrape_digibyte_conf |
3799 | 3799 |
|
3800 | | - # query for digibyte network |
3801 | | - query_digibyte_chain |
| 3800 | + # query for digibyte network |
| 3801 | + query_digibyte_chain |
3802 | 3802 |
|
3803 | | - # update max connections |
3804 | | - query_digibyte_maxconnections |
| 3803 | + # query for digibyte listening port |
| 3804 | + query_digibyte_port |
3805 | 3805 |
|
3806 | | - # update rpc credentials |
3807 | | - query_digibyte_rpc |
| 3806 | + # update max connections |
| 3807 | + query_digibyte_maxconnections |
| 3808 | + |
| 3809 | + # update rpc credentials |
| 3810 | + query_digibyte_rpc |
| 3811 | + |
| 3812 | + fi |
3808 | 3813 |
|
3809 | 3814 | fi |
3810 | 3815 |
|
@@ -4011,8 +4016,8 @@ if [ $TIME_DIF_1MIN -ge 60 ]; then |
4011 | 4016 | # Update primary DigiByte Node sync progress every minute, if it is running |
4012 | 4017 | if [ "$DGB_STATUS" = "running" ]; then |
4013 | 4018 |
|
4014 | | - # Get current listening port |
4015 | | - DGB_LISTEN_PORT=$($DGB_CLI getnetworkinfo 2>/dev/null | jq .localaddresses[0].port) |
| 4019 | + # query for digibyte listening port |
| 4020 | + query_digibyte_port |
4016 | 4021 |
|
4017 | 4022 | # Lookup sync progress value from debug.log. Use previous saved value if no value is found. |
4018 | 4023 | if [ "$DGB_BLOCKSYNC_PROGRESS" = "synced" ]; then |
@@ -4065,8 +4070,11 @@ if [ $TIME_DIF_1MIN -ge 60 ]; then |
4065 | 4070 | # Update secondary DigiByte Node sync progress every minute, if it is running |
4066 | 4071 | if [ "$DGB2_STATUS" = "running" ] && [ "$DGB_DUAL_NODE" = "YES" ]; then |
4067 | 4072 |
|
4068 | | - # Get current listening port |
4069 | | - DGB2_LISTEN_PORT=$($DGB_CLI -testnet getnetworkinfo 2>/dev/null | jq .localaddresses[0].port) |
| 4073 | + # if the primary node is running, we have just run all this checks so we don't need to do it again in the same loop |
| 4074 | + if [ "$DGB_STATUS" != "running" ]; then |
| 4075 | + # query for digibyte listening port |
| 4076 | + query_digibyte_port |
| 4077 | + fi |
4070 | 4078 |
|
4071 | 4079 | # Lookup sync progress value from debug.log. Use previous saved value if no value is found. |
4072 | 4080 | if [ "$DGB2_BLOCKSYNC_PROGRESS" = "synced" ]; then |
|
0 commit comments