diff --git a/ops/restore-tests/run-restore-job-with-ntfy.sh b/ops/restore-tests/run-restore-job-with-ntfy.sh index 9180d55..76d0feb 100644 --- a/ops/restore-tests/run-restore-job-with-ntfy.sh +++ b/ops/restore-tests/run-restore-job-with-ntfy.sh @@ -15,9 +15,15 @@ REPORT_FILE="$REPORT_ROOT/${MODE}-$(date +%F).md" mkdir -p "$REPORT_ROOT" +echo "Running restore job: $MODE" +echo "Report target: $REPORT_FILE" + if "$SCRIPT_DIR/run-restore-checks.sh" "$MODE" > "$REPORT_FILE"; then + echo "Restore job succeeded, sending ntfy..." "$SCRIPT_DIR/send-ntfy.sh" "$TOPIC" "Restore job ok: $MODE" "Restore job succeeded. Report: $REPORT_FILE" default || true + echo "Done" else + echo "Restore job failed, sending ntfy..." "$SCRIPT_DIR/send-ntfy.sh" "$TOPIC" "Restore job failed: $MODE" "Restore job failed. Report: $REPORT_FILE" high || true exit 1 fi diff --git a/ops/restore-tests/send-ntfy.sh b/ops/restore-tests/send-ntfy.sh index ac5d19c..e707165 100644 --- a/ops/restore-tests/send-ntfy.sh +++ b/ops/restore-tests/send-ntfy.sh @@ -14,6 +14,8 @@ fi NTFY_URL="${NTFY_URL:-https://ntfy.kaleschke.info}" curl -fsS \ + --connect-timeout 5 \ + --max-time 10 \ -H "Title: $TITLE" \ -H "Priority: $PRIORITY" \ -d "$MESSAGE" \