mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 14:08:07 +00:00
Improve upgrade logs more
This commit is contained in:
parent
016dd4ac12
commit
3233325376
|
@ -46,6 +46,16 @@ def get_product_key():
|
|||
except:
|
||||
product_key = "product_key_error"
|
||||
return product_key
|
||||
def get_drive_size():
|
||||
size = "-1"
|
||||
size = subprocess.check_output("df /mnt/hdd | grep /dev | awk '{print $2}'", shell=True).strip()
|
||||
size = int(size) / 1000 / 1000
|
||||
return size
|
||||
def get_quicksync_enabled():
|
||||
enabled = 1
|
||||
if os.path.isfile("/mnt/hdd/mynode/settings/quicksync_disabled"):
|
||||
enabled = 0
|
||||
return enabled
|
||||
|
||||
# Checkin every 24 hours
|
||||
def check_in():
|
||||
|
@ -56,7 +66,9 @@ def check_in():
|
|||
"serial": get_device_serial(),
|
||||
"device_type": get_device_type(),
|
||||
"version": get_current_version(),
|
||||
"product_key": product_key
|
||||
"product_key": product_key,
|
||||
"drive_size": get_drive_size(),
|
||||
"quicksync_enabled": get_quicksync_enabled(),
|
||||
}
|
||||
|
||||
# Check for new version
|
||||
|
|
|
@ -90,7 +90,7 @@ fi
|
|||
# Run post upgrade script
|
||||
for i in {1..3}
|
||||
do
|
||||
/bin/bash /usr/bin/mynode_post_upgrade.sh > /home/admin/upgrade_logs/reinstall_app_${APP}_post_${i}.txt 2>&1
|
||||
/bin/bash /usr/bin/mynode_post_upgrade.sh 2>&1 | tee /home/admin/upgrade_logs/reinstall_app_${APP}_post_${i}.txt
|
||||
RC=$?
|
||||
if [ "${RC}" -eq "0" ]; then
|
||||
rm -f $UPGRADE_ERROR_FILE
|
||||
|
|
Loading…
Reference in New Issue
Block a user