Update disk-check.sh

This commit is contained in:
colin 2024-11-30 13:12:13 -05:00
parent 894fe5fb8f
commit 8a6f7416bd
1 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,9 @@ echo "Uploading report to Hastebin..." | tee -a "$LOG_FILE"
response=$(curl -s -X POST -T "$LOG_FILE" "$HASTE_URL") response=$(curl -s -X POST -T "$LOG_FILE" "$HASTE_URL")
if [[ $response == *"key"* ]]; then if [[ $response == *"key"* ]]; then
key=$(echo "$response" | jq -r '.key') key=$(echo "$response" | jq -r '.key')
echo "Report available at: $HASTE_URL/$key" | tee -a "$LOG_FILE" # Remove /documents/ and use the key to form the correct URL
report_url="https://haste.nixc.us/$key"
echo "Report available at: $report_url" | tee -a "$LOG_FILE"
else else
echo "Failed to upload report to Hastebin. Response: $response" | tee -a "$LOG_FILE" echo "Failed to upload report to Hastebin. Response: $response" | tee -a "$LOG_FILE"
fi fi