From 2eb2afc3a48cf8ca18991c16ae45ada82c01b370 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 8 Oct 2024 09:12:21 +0200 Subject: [PATCH] fixed s3 notifiy kuma --- s3/s3_notify_uptime_kuma.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/s3/s3_notify_uptime_kuma.sh b/s3/s3_notify_uptime_kuma.sh index e04514a..817dba9 100755 --- a/s3/s3_notify_uptime_kuma.sh +++ b/s3/s3_notify_uptime_kuma.sh @@ -1,19 +1,18 @@ #!/bin/bash -# Set S3_KUMA_STATUS_ENDPOINT variable from environment or default to empty string +# Set KUMA_STATUS_ENDPOINT variable from environment or default to empty string S3_KUMA_STATUS_ENDPOINT=${S3_KUMA_STATUS_ENDPOINT:-} if [ -z "$S3_KUMA_STATUS_ENDPOINT" ]; then - echo "INFO: S3_KUMA_STATUS_ENDPOINT is not set. Skipping." + echo "INFO: S3_KUMA_STATUS_ENDPOINTT is not set. Skipping." else - # Use curl to make a POST request to the status endpoint - response=$(curl -s -X POST \\ - "$S3_KUMA_STATUS_ENDPOINT") + # Use curl to make a GET request to the status endpoint + response=$(curl -s -X GET "$S3_KUMA_STATUS_ENDPOINT") # Check if the request was successful if [ $? -eq 0 ]; then echo "Status endpoint responded successfully: $response" else - echo "Error: Failed to send status update to $S3_KUMA_STATUS_ENDPOINT. Status code: $?" + echo "Error: Failed to push status from $S3_KUMA_STATUS_ENDPOINT. Status code: $?" fi fi \ No newline at end of file