# Copyright (c) 2021-2025 community-scripts ORG # Author: michelroegl-brunner # License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE post_to_api() { if ! command -v curl &> /dev/null; then return fi if [ "$DIAGNOSTICS" = "no" ]; then return fi if [ -z "$RANDOM_UUID" ]; then return fi local API_URL="http://api.community-scripts.org/upload" local pve_version="not found" pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') JSON_PAYLOAD=$(cat < /dev/null; then return fi if [ "$POST_UPDATE_DONE" = true ]; then return 0 fi local API_URL="http://api.community-scripts.org/upload/updatestatus" local status="${1:-failed}" local error="${2:-No error message}" JSON_PAYLOAD=$(cat <