mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-13 07:10:51 +02:00
* update build.func * update build.func * update api.func * update api.func
This commit is contained in:
committed by
GitHub
parent
5451e61484
commit
682674727c
@@ -42,14 +42,11 @@ EOF
|
||||
RESPONSE=$(curl -s -o response.txt -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$JSON_PAYLOAD") || true
|
||||
|
||||
|
||||
}
|
||||
|
||||
post_to_api_vm() {
|
||||
|
||||
DIAGNOSTICS=$(grep -i "^DIAGNOSTICS=" /usr/local/community-scripts/diagnostics | awk -F'=' '{print $2}')
|
||||
|
||||
if ! command -v curl &> /dev/null; then
|
||||
return
|
||||
fi
|
||||
@@ -91,7 +88,6 @@ EOF
|
||||
RESPONSE=$(curl -s -o response.txt -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$JSON_PAYLOAD") || true
|
||||
|
||||
}
|
||||
|
||||
POST_UPDATE_DONE=false
|
||||
@@ -106,7 +102,7 @@ post_update_to_api() {
|
||||
fi
|
||||
local API_URL="http://api.community-scripts.org/upload/updatestatus"
|
||||
local status="${1:-failed}"
|
||||
local error="${2:-unknown}"
|
||||
local error="${2:-No error message}"
|
||||
|
||||
JSON_PAYLOAD=$(cat <<EOF
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user