Fix heartbeat POST handling

This commit is contained in:
kzolotarev95 committed 2026-06-29 04:13:37 +04:00
1 parent 776400a107
commit 151f5353bb
2 files changed
+22 -7

No files matched your search

+7 -7
View File
@@ -294,13 +294,6 @@ post_json() {
token="$2"
file="$3"
if command -v uclient-fetch >/dev/null 2>&1; then
uclient-fetch -q -O - \
--header="Authorization: Bearer $token" \
--header="Content-Type: application/json" \
--post-file="$file" "$url"
return
fi
if command -v wget >/dev/null 2>&1; then
wget -q -O - \
--header="Authorization: Bearer $token" \
@@ -315,6 +308,13 @@ post_json() {
--data-binary "@$file" "$url"
return
fi
if command -v uclient-fetch >/dev/null 2>&1; then
uclient-fetch -q -O - \
--header="Authorization: Bearer $token" \
--header="Content-Type: application/json" \
--post-file="$file" "$url"
return
fi
die "для heartbeat нужен uclient-fetch, wget или curl"
}