From bcefa2a437b546d7dbd1d304db3e9a30e54c5ef2 Mon Sep 17 00:00:00 2001 From: Nick Heppler Date: Fri, 25 Apr 2025 12:22:59 -0400 Subject: [PATCH] fix(backup): remove -n flag from curl to fix empty response issue The -n flag was causing curl to rely on .netrc, which conflicted with explicit -u username:password usage and led to empty responses from the backup API. Removing it ensures proper authentication. --- lubelogger_backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lubelogger_backup.sh b/lubelogger_backup.sh index 1de4324..7e0552e 100755 --- a/lubelogger_backup.sh +++ b/lubelogger_backup.sh @@ -52,7 +52,7 @@ log "🔄 Starting Lubelogger backup job" # Uptime Kuma Check-in: Inform that the backup process has started uptime_kuma_checkin -response=$(curl -s -n -u "$USERNAME:$PASSWORD" --location "$BASE_URL/api/makebackup") +response=$(curl -s -u "$USERNAME:$PASSWORD" --location "$BASE_URL/api/makebackup") if [[ -z "$response" ]]; then log "❌ Error: Empty response from backup API" @@ -63,7 +63,7 @@ fi backup_url="${BASE_URL}${response//\"/}" log "⬇️ Downloading backup from $backup_url" -curl -s -n -u "$USERNAME:$PASSWORD" --location "$backup_url" -o "$OUTPUT_FILE" +curl -s -u "$USERNAME:$PASSWORD" --location "$backup_url" -o "$OUTPUT_FILE" if [[ $? -eq 0 ]]; then log "✅ Backup saved to $OUTPUT_FILE"