mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-07 18:43:41 +08:00
@@ -5,12 +5,12 @@ set -Eeuo pipefail
|
||||
[ -f "/run/qemu.count" ] && echo "QEMU is shutting down.." && exit 1
|
||||
|
||||
file="/run/dsm.url"
|
||||
url="http://127.0.0.1:2210/read?command=10"
|
||||
|
||||
if [ ! -f "$file" ]; then
|
||||
|
||||
# Retrieve IP from guest VM for Docker healthcheck
|
||||
|
||||
{ json=$(curl -m 30 -sk http://127.0.0.1:2210/read?command=10); rc=$?; } || :
|
||||
{ json=$(curl -m 20 -sk "$url"); rc=$?; } || :
|
||||
(( rc != 0 )) && echo "Failed to connect to guest: curl error $rc" && exit 1
|
||||
|
||||
{ result=$(echo "$json" | jq -r '.status'); rc=$?; } || :
|
||||
|
||||
Reference in New Issue
Block a user