More version check improvements
This commit is contained in:
parent
efd14c76d3
commit
39bf07ece2
13
rootfs/standard/usr/bin/mynode_get_latest_version.sh
Executable file
13
rootfs/standard/usr/bin/mynode_get_latest_version.sh
Executable 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 )
|
|
@ -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/ )
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue
Block a user