More version check improvements

This commit is contained in:
Taylor Helsper 2020-07-24 13:02:15 -05:00
parent efd14c76d3
commit 39bf07ece2
4 changed files with 21 additions and 7 deletions

View File

@ -0,0 +1,13 @@
#!/bin/bash
set -x
source /usr/share/mynode/mynode_config.sh
torify wget $LATEST_VERSION_URL -O /usr/share/mynode/latest_version || \
( sleep 1s && torify wget $LATEST_VERSION_URL -O /usr/share/mynode/latest_version ) || \
( sleep 1s && wget $LATEST_VERSION_URL -O /usr/share/mynode/latest_version )
torify wget $LATEST_BETA_VERSION_URL -O /usr/share/mynode/latest_beta_version || \
( sleep 1s && torify wget $LATEST_BETA_VERSION_URL -O /usr/share/mynode/latest_beta_version ) || \
( sleep 1s && wget $LATEST_BETA_VERSION_URL -O /usr/share/mynode/latest_beta_version )

View File

@ -4,7 +4,11 @@ source /usr/share/mynode/mynode_config.sh
set -x
sleep 10s
sleep 2s
# Load webpage once to trigger initial load
curl http://localhost/
# Load webpage once to trigger initial load - some setup is not triggered until first page load
curl http://localhost/ || \
( sleep 5s && curl http://localhost/ ) || \
( sleep 5s && curl http://localhost/ ) || \
( sleep 5s && curl http://localhost/ ) || \
( sleep 5s && curl http://localhost/ )

View File

@ -8,8 +8,6 @@ CONFIG["btcrpcexplorer_enabled"] = True
CONFIG["lndhub_enabled"] = True
# myNode variables
LATEST_VERSION_URL = "https://www.mynodebtc.com/device/latest_version"
LATEST_BETA_VERSION_URL = "https://www.mynodebtc.com/device/latest_beta_version"
CHECKIN_URL = "https://www.mynodebtc.com/device_api/check_in.php"
# Bitcoin Variables

View File

@ -99,8 +99,7 @@ def get_current_beta_version():
return current_beta_version
def update_latest_version():
os.system("torify wget "+LATEST_VERSION_URL+" -O /usr/share/mynode/latest_version")
os.system("torify wget "+LATEST_BETA_VERSION_URL+" -O /usr/share/mynode/latest_beta_version")
os.system("/usr/bin/mynode_get_latest_version.sh")
return True
def get_latest_version():