mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 05:20:02 +08:00
fix: Prepare for removal
This commit is contained in:
parent
3c342a05aa
commit
5ad5f8a8ef
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
VERSION="8"
|
VERSION="9"
|
||||||
HEADER="VirtualDSM Agent"
|
HEADER="VirtualDSM Agent"
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
@ -45,8 +45,12 @@ function downloadUpdate {
|
|||||||
|
|
||||||
[[ "$remote_size" == "" || "$remote_size" == "0" ]] && return
|
[[ "$remote_size" == "" || "$remote_size" == "0" ]] && return
|
||||||
|
|
||||||
|
remote_size=$(($remote_size+0))
|
||||||
|
((remote_size<100)) && return
|
||||||
|
|
||||||
SCRIPT=$(readlink -f "${BASH_SOURCE[0]}")
|
SCRIPT=$(readlink -f "${BASH_SOURCE[0]}")
|
||||||
local_size=$(stat -c%s "$SCRIPT")
|
local_size=$(stat -c%s "$SCRIPT")
|
||||||
|
local_size=$(($local_size+0))
|
||||||
|
|
||||||
[[ remote_size -eq local_size ]] && return
|
[[ remote_size -eq local_size ]] && return
|
||||||
|
|
||||||
@ -126,31 +130,6 @@ else
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
delay=500
|
|
||||||
elapsed=$((($(date +%s%N) - ts)/1000000))
|
|
||||||
|
|
||||||
if [[ delay -gt elapsed ]]; then
|
|
||||||
difference=$((delay-elapsed))
|
|
||||||
float=$(echo | awk -v diff="${difference}" '{print diff * 0.001}')
|
|
||||||
sleep "$float"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Display message in docker log output
|
|
||||||
|
|
||||||
IP=$(ip address show dev eth0 | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/)
|
|
||||||
|
|
||||||
if [[ "$IP" == "20.20"* ]]; then
|
|
||||||
MSG="port 5000"
|
|
||||||
else
|
|
||||||
MSG="http://${IP}:5000"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
info "--------------------------------------------------------"
|
|
||||||
info " You can now login to DSM at ${MSG}"
|
|
||||||
info "--------------------------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Wait for NMI interrupt as a shutdown signal
|
# Wait for NMI interrupt as a shutdown signal
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user