mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 15:45:54 +00:00
@@ -16,7 +16,7 @@ post_to_api() {
|
||||
return
|
||||
fi
|
||||
|
||||
local API_URL="http://api.community-scripts.org/dev/upload"
|
||||
local API_URL="http://api.community-scripts.org/upload"
|
||||
local pve_version="not found"
|
||||
pve_version=$(pveversion | awk -F'[/ ]' '{print $2}')
|
||||
|
||||
@@ -39,10 +39,6 @@ post_to_api() {
|
||||
EOF
|
||||
)
|
||||
|
||||
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$JSON_PAYLOAD") || true
|
||||
|
||||
}
|
||||
|
||||
post_to_api_vm() {
|
||||
@@ -63,7 +59,7 @@ post_to_api_vm() {
|
||||
return
|
||||
fi
|
||||
|
||||
local API_URL="http://api.community-scripts.org/dev/upload"
|
||||
local API_URL="http://api.community-scripts.org/upload"
|
||||
local pve_version="not found"
|
||||
pve_version=$(pveversion | awk -F'[/ ]' '{print $2}')
|
||||
|
||||
@@ -88,10 +84,6 @@ post_to_api_vm() {
|
||||
EOF
|
||||
)
|
||||
|
||||
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$JSON_PAYLOAD") || true
|
||||
|
||||
}
|
||||
|
||||
POST_UPDATE_DONE=false
|
||||
@@ -104,7 +96,7 @@ post_update_to_api() {
|
||||
if [ "$POST_UPDATE_DONE" = true ]; then
|
||||
return 0
|
||||
fi
|
||||
local API_URL="http://api.community-scripts.org/dev/upload/updatestatus"
|
||||
local API_URL="http://api.community-scripts.org/upload/updatestatus"
|
||||
local status="${1:-failed}"
|
||||
local error="${2:-No error message}"
|
||||
|
||||
@@ -116,9 +108,7 @@ post_update_to_api() {
|
||||
}
|
||||
EOF
|
||||
)
|
||||
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$JSON_PAYLOAD") || true
|
||||
|
||||
|
||||
POST_UPDATE_DONE=true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user